Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: Temperature above/below target
- description: ""
- trigger:
- - platform: state
- entity_id:
- - input_number.target_temperature_min
- - input_number.target_temperature_max
- - input_boolean.ilmastointi
- - input_boolean.nukkumassa
- - platform: template
- alias: Above max
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) > (states('input_number.target_temperature_max')|float)
- }}
- for:
- hours: 0
- minutes: 5
- seconds: 0
- - platform: template
- alias: Below max and above min+0.5
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) >= (states('input_number.target_temperature_min')|float+0.5) and
- (states('sensor.keittio_olohuone_temperature')|float) <= (states('input_number.target_temperature_max')|float)
- }}
- for:
- hours: 0
- minutes: 10
- seconds: 0
- - platform: template
- alias: Above min and below min+0.5
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) >= (states('input_number.target_temperature_min')|float) and
- (states('sensor.keittio_olohuone_temperature')|float) < (states('input_number.target_temperature_min')|float+0.5)
- }}
- for:
- hours: 0
- minutes: 10
- seconds: 0
- - platform: template
- alias: Above min
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) >= (states('input_number.target_temperature_min')|float)
- }}
- for:
- hours: 0
- minutes: 5
- seconds: 0
- - platform: template
- alias: Below min
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) < (states('input_number.target_temperature_min')|float)
- }}
- for:
- hours: 0
- minutes: 5
- seconds: 0
- - alias: Ulkona >= Max
- platform: template
- value_template: |
- {{
- (states('sensor.ruuvitag_takapiha_temperature')|float) >= (states('input_number.target_temperature_max')|float)
- }}
- for:
- minutes: 15
- - alias: Ulkona < Max
- platform: template
- value_template: |
- {{
- (states('sensor.ruuvitag_takapiha_temperature')|float) < (states('input_number.target_temperature_max')|float)
- }}
- for:
- minutes: 15
- - alias: Ulkona < Min
- platform: template
- value_template: |
- {{
- (states('sensor.ruuvitag_takapiha_temperature')|float) < (states('input_number.target_temperature_min')|float)
- }}
- for:
- minutes: 15
- condition:
- - condition: or
- conditions:
- - condition: template
- alias: Above max
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) > (states('input_number.target_temperature_max')|float)
- }}
- - condition: template
- alias: Below max and above min+0.5
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) >= (states('input_number.target_temperature_min')|float+0.5) and
- (states('sensor.keittio_olohuone_temperature')|float) <= (states('input_number.target_temperature_max')|float)
- }}
- - condition: template
- alias: Above min and below min+0.5
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) >= (states('input_number.target_temperature_min')|float) and
- (states('sensor.keittio_olohuone_temperature')|float) < (states('input_number.target_temperature_min')|float+0.5)
- }}
- - condition: template
- alias: Below min
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) < (states('input_number.target_temperature_min')|float)
- }}
- action:
- - choose:
- - conditions:
- - condition: or
- conditions:
- - condition: template
- alias: Above max
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) > (states('input_number.target_temperature_max')|float)
- }}
- - condition: template
- alias: Below max and above min+0.5
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) >= (states('input_number.target_temperature_min')|float+0.5) and
- (states('sensor.keittio_olohuone_temperature')|float) <= (states('input_number.target_temperature_max')|float)
- }}
- enabled: true
- - condition: state
- entity_id: input_boolean.ilmastointi
- state: "on"
- - condition: or
- conditions:
- - condition: template
- value_template: |-
- {{
- (states('sensor.ruuvitag_takapiha_temperature')|float) < (states('input_number.target_temperature_max')|float)
- and (states('sensor.keittio_olohuone_temperature')|float) > (states('input_number.target_temperature_max')|float)
- }}
- alias: Ulkona alle max ja sisällä yli max
- - alias: Ulkona >= max
- condition: template
- value_template: |-
- {{
- (states('sensor.ruuvitag_takapiha_temperature')|float) >= (states('input_number.target_temperature_max')|float)
- }}
- sequence:
- - service: climate.set_fan_mode
- data:
- fan_mode: |-
- {% if is_state('input_boolean.nukkumassa', 'on') %}
- low
- {% else %}
- low{# auto #}
- {% endif %}
- target:
- entity_id: climate.electrolux_climate
- - service: climate.set_hvac_mode
- data:
- hvac_mode: cool
- target:
- entity_id: climate.electrolux_climate
- - service: climate.set_temperature
- data:
- temperature: |-
- {{
- states('input_number.target_temperature_min')|float|round(0, 'floor') -1
- }}
- target:
- entity_id: climate.electrolux_climate
- - service: climate.turn_on
- target:
- entity_id: climate.electrolux_climate
- data: {}
- - conditions:
- - condition: template
- alias: Above min and below min+0.5
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) >= (states('input_number.target_temperature_min')|float) and
- (states('sensor.keittio_olohuone_temperature')|float) < (states('input_number.target_temperature_min')|float+0.5)
- }}
- - condition: state
- entity_id: input_boolean.ilmastointi
- state: "on"
- - condition: template
- value_template: |-
- {{
- (states('sensor.ruuvitag_takapiha_temperature')|float) < (states('input_number.target_temperature_max')|float)
- and (states('sensor.keittio_olohuone_temperature')|float) > (states('input_number.target_temperature_max')|float)
- }}
- alias: Ulkona alle max ja sisällä yli max
- sequence:
- - service: climate.set_hvac_mode
- data:
- hvac_mode: fan_only
- target:
- entity_id: climate.electrolux_climate
- - service: climate.set_temperature
- data:
- temperature: |-
- {{
- states('input_number.target_temperature_min')|float|round(0, 'floor') -1
- }}
- target:
- entity_id: climate.electrolux_climate
- - service: climate.set_fan_mode
- data:
- fan_mode: |-
- {% if is_state('input_boolean.nukkumassa', 'on') %}
- low
- {% else %}
- low{# auto #}
- {% endif %}
- target:
- entity_id: climate.electrolux_climate
- - service: climate.turn_on
- target:
- entity_id: climate.electrolux_climate
- data: {}
- - conditions:
- - condition: template
- alias: Temp not up-to-date
- value_template: |-
- {{
- state_attr('climate.electrolux_climate', 'temperature') != states('input_number.target_temperature_min')|float|round(0, 'floor') -1
- }}
- - condition: state
- entity_id: input_boolean.ilmastointi
- state: "on"
- sequence:
- - service: climate.set_temperature
- data:
- temperature: |-
- {{
- states('input_number.target_temperature_min')|float|round(0, 'floor') -1
- }}
- target:
- entity_id: climate.electrolux_climate
- - conditions:
- - condition: or
- conditions:
- - condition: template
- alias: Below min
- value_template: |-
- {{
- (states('sensor.keittio_olohuone_temperature')|float) < (states('input_number.target_temperature_min')|float)
- }}
- - condition: state
- entity_id: input_boolean.ilmastointi
- state: "off"
- - alias: Ulkona < minimi
- condition: template
- value_template: |-
- {{
- (states('sensor.ruuvitag_takapiha_temperature')|float) < (states('input_number.target_temperature_min')|float)
- and (states('sensor.keittio_olohuone_temperature')|float) < (states('input_number.target_temperature_min')|float) + 0.5
- }}
- sequence:
- - service: climate.turn_off
- target:
- entity_id: climate.electrolux_climate
- data: {}
- - conditions:
- - condition: state
- entity_id: input_boolean.nukkumassa
- state: "on"
- - condition: state
- entity_id: climate.electrolux_climate
- state: cool
- sequence:
- - service: climate.set_fan_mode
- data:
- fan_mode: |-
- {% if is_state('input_boolean.nukkumassa', 'on') %}
- low
- {% else %}
- low{# auto #}
- {% endif %}
- target:
- entity_id: climate.electrolux_climate
- mode: restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement