-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathautomations.yaml
25 lines (25 loc) · 1.09 KB
/
automations.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- id: 4b3f0be55cd64e7ab11095bc250be29c
alias: "Sync Govee Heater States with API"
description: "Synchronizes the state of Govee heaters with their API responses to ensure UI reflects actual device states"
mode: single
trigger:
- platform: state
entity_id: sensor.govee_heater_1_api_state
# - platform: state
# entity_id: sensor.govee_heater_2_api_state
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.entity_id == 'sensor.govee_heater_1_api_state' }}"
sequence:
- service: input_boolean.turn_{{ 'on' if trigger.to_state.state == '1' else 'off' }}
target:
entity_id: input_boolean.govee_heater_1_state
# - conditions:
# - condition: template
# value_template: "{{ trigger.entity_id == 'sensor.govee_heater_2_api_state' }}"
# sequence:
# - service: input_boolean.turn_{{ 'on' if trigger.to_state.state == '1' else 'off' }}
# target:
# entity_id: input_boolean.govee_heater_2_state