Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: Sauna lämpötila triggerit
- mode: single
- trigger:
- - platform: template
- value_template: >-
- {{ (states('sensor.ruuvitag_sauna_temperature') | float) < (states('input_number.sauna_kylma') | float) }}
- - platform: template
- value_template: >-
- {{ (states('sensor.ruuvitag_sauna_temperature') | float) > (states('input_number.sauna_valmis') | float) }}
- for:
- minutes: 1
- action:
- - choose:
- - conditions:
- - condition: template
- value_template: >-
- {{ (states('sensor.ruuvitag_sauna_temperature') | float) < (states('input_number.sauna_kylma') | float) }}
- sequence:
- - service: input_boolean.turn_off
- target:
- entity_id: input_boolean.sauna_valmiina
- - conditions:
- - condition: template
- value_template: >-
- {{ (states('sensor.ruuvitag_sauna_temperature') | float) > (states('input_number.sauna_valmis') | float) }}
- sequence:
- - service: input_boolean.turn_on
- target:
- entity_id: input_boolean.sauna_valmiina
- alias: Sauna kylmä/kuuma
- mode: single
- trigger:
- - platform: state
- entity_id:
- - input_boolean.sauna_valmiina
- action:
- - choose:
- - conditions:
- - condition: state
- entity_id: input_boolean.sauna_valmiina
- state: "on"
- sequence:
- - service: script.sauna_lammin
- - conditions:
- - condition: state
- entity_id: input_boolean.sauna_valmiina
- state: "off"
- sequence:
- - service: script.sauna_kylma
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement