Hallo,
i want to do the following:
if my RTV is off, i press my switch and it turns on.
iif its on and i press my switch, it turns off.
The problem is, that if its off and i press the switch, it turns on and then off.
How do i fix this?
YAML for turn on:
alias: HZ WZ an Tag 20°C
description: “”
trigger:
- device_id: d49f7bfad074352924a1e21eddeeecf2
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
condition: - condition: state
entity_id: climate.lumi_lumi_airrtc_agl001_thermostat
state: “off” - condition: state
entity_id: climate.lumi_lumi_airrtc_agl001_thermostat_2
state: “off” - condition: state
entity_id: schedule.tag
state: “on” - type: is_not_open
condition: device
device_id: 60f69bbd9ad28a9a0b78d12c316ab776
entity_id: aa84ee2d0d423b30e66f57531dbec8d8
domain: binary_sensor
action: - service: climate.turn_on
data: {}
target:
area_id: wohnzimmer - service: climate.set_temperature
data:
temperature: 20
target:
area_id: wohnzimmer
mode: single
Yaml for off:
alias: HK WZ aus Tag/Nacht
description: “”
trigger:
- device_id: d49f7bfad074352924a1e21eddeeecf2
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
condition: - condition: state
entity_id: binary_sensor.lumi_lumi_airrtc_agl001_calibrated
state: “on”
for:
hours: 0
minutes: 0
seconds: 0
enabled: true - condition: state
entity_id: binary_sensor.lumi_lumi_airrtc_agl001_calibrated_2
state: “on”
for:
hours: 0
minutes: 0
seconds: 0
enabled: true
action: - service: climate.turn_off
data: {}
target:
area_id: wohnzimmer
mode: single
Thanks for helping