Last active
February 24, 2021 23:59
-
-
Save Didgeridrew/27c4a03f2f993eb92a0f4f58cb14ab0c to your computer and use it in GitHub Desktop.
Home Assistant: Using threshold and derivative for Tom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The derivative sensor outputs positive for rising temperatures and negative for falling temperatures. | |
# The threshold sensor will give you a binary sensor called binary_sensor.furnace_temperature_rising | |
# which outputs "on" when temperatures are rising and "off" when they are falling. | |
# The hysteresis setting determines the ˚F/min rate necessary to switch states, limiting false positives. | |
# Finally, the template sensor tracks the amount of time between changes in the threshold sensor. | |
sensor: | |
- platform: derivative | |
source: sensor.furnace_temperature | |
unit_time: min | |
name: furnace temperature derivative | |
time_window: 00:01:00 | |
- platform: template | |
sensors: | |
furnace_temp_period: | |
value_template: >- | |
{{ relative_time(states.binary_sensor.furnace_temperature_rising.last_changed)}} | |
binary_sensor: | |
- platform: threshold | |
entity_id: sensor.furnace_temperature_derivative | |
upper: 0 | |
hysteresis: 2.0 | |
name: Furnace Temperature Rising |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment