Skip to content

Instantly share code, notes, and snippets.

@jamesonuk
Last active September 24, 2023 07:05
Show Gist options
  • Save jamesonuk/a5c55d61b817a925637508e1b349fbf0 to your computer and use it in GitHub Desktop.
Save jamesonuk/a5c55d61b817a925637508e1b349fbf0 to your computer and use it in GitHub Desktop.
Set TRV HVAC state blueprint for HA
blueprint:
name: Set TRV HVAC Status
description: Set TRV to Heat / Off depending on temperature
domain: automation
input:
input_trv:
name: TRV
description: The TRV to set
selector:
entity:
domain: climate
trigger_variables:
trv: !input input_trv
trigger:
- platform: template
value_template: "{{ state_attr(trv, 'temperature') > state_attr(trv, 'local_temperature')}}"
- platform: template
value_template: "{{ state_attr(trv, 'temperature') <= state_attr(trv, 'local_temperature')}}"
- platform: homeassistant
event: start
condition: []
action:
- service: climate.set_hvac_mode
data:
hvac_mode: |
{{ iif(not state_attr(trv, 'temperature') <= state_attr(trv, 'local_temperature'), 'heat', 'off', 'off') }}
target:
entity_id: !input input_trv
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment