Files
N22/include/automations/bryggerbutton.yaml
T
claus 04c29a8839 Skift cover.open/close til cover.toggle med sensor-check
GoGoGate2 tror altid porten er lukket, så open/close virker ikke.
Bruger nu cover.toggle med binary_sensor.garageport check.
2026-04-17 07:58:01 +02:00

70 lines
1.7 KiB
YAML

- id: hue_switch_garage_and_lights
alias: Hue switch - garage og lys
mode: restart
trigger:
- platform: device
domain: hue
device_id: 5f6b41e54f3226acd9c9ab54a3acb527
type: initial_press
subtype: 1
id: open_garage
- platform: device
domain: hue
device_id: 5f6b41e54f3226acd9c9ab54a3acb527
type: long_press
subtype: 1
id: close_garage
- platform: device
domain: hue
device_id: 5f6b41e54f3226acd9c9ab54a3acb527
type: initial_press
subtype: 4
id: lights_off
- platform: device
domain: hue
device_id: 5f6b41e54f3226acd9c9ab54a3acb527
type: long_press
subtype: 4
id: lights_on
action:
- choose:
- conditions:
- condition: trigger
id: open_garage
sequence:
- condition: state
entity_id: binary_sensor.garageport
state: "off"
- service: cover.toggle
target:
entity_id: cover.anne
- conditions:
- condition: trigger
id: close_garage
sequence:
- condition: state
entity_id: binary_sensor.garageport
state: "on"
- service: cover.toggle
target:
entity_id: cover.anne
- conditions:
- condition: trigger
id: lights_off
sequence:
- service: light.turn_off
target:
entity_id: light.alle_lys
- conditions:
- condition: trigger
id: lights_on
sequence:
- service: light.turn_on
target:
entity_id: light.alle_lys