Last active
May 11, 2020 05:35
-
-
Save bawejakunal/b170e088720068b39d465dded2512c08 to your computer and use it in GitHub Desktop.
This file contains 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
- id: '1585424767193' # automation unique identifier | |
alias: Heater Automation | |
description: Turn on/off Heater based on temperature changes | |
trigger: | |
- below: '22.0' # temperature in celsiues | |
entity_id: sensor.aeon_labs_zw100_multisensor_6_temperature # sensor measuring temperature | |
for: 00:05:00 # duration in HH:MM:SS format | |
platform: numeric_state | |
- above: '23.9' # state change to trigger the automation | |
entity_id: sensor.aeon_labs_zw100_multisensor_6_temperature | |
for: 00:05:00 | |
platform: numeric_state | |
condition: [] | |
action: | |
- entity_id: switch.heater # switch that should be acted upon | |
# action taken on entity based on reportedstate changes is selected in service_template | |
service_template: "{% if states('sensor.aeon_labs_zw100_multisensor_6_temperature')\ | |
\ | float < 22.0 and is_state('switch.heater', 'off')%}\n switch.turn_on\n\ | |
{% elif states('sensor.aeon_labs_zw100_multisensor_6_temperature') | float >=\ | |
\ 24 %}\n switch.turn_off\n{% endif %}\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment