I can not run these 2 devices at the same time, so whenever switch.2 is on, climate.styrbordfrostvakt has to stay off. And since its very cold, climate.styrbordfrostvakt has to be on whenever switch.2 is off.
I use 2 Automations to do this, how do I merge them to one?
alias: Styrbord Frostvakt AV når Varmebehov på
description: ''
trigger:
- platform: state
entity_id: switch.2
from: 'off'
to: 'on'
condition: []
action:
- service: climate.turn_off
target:
entity_id: climate.styrbordfrostvakt
mode: single
alias: Styrbord Frostvakt på når Varmebehov av
description: ''
trigger:
- platform: state
entity_id: switch.2
from: 'on'
to: 'off'
condition: []
action:
- service: climate.turn_on
target:
entity_id: climate.styrbordfrostvakt
mode: single