tror det virker nu
This commit is contained in:
@@ -3,58 +3,60 @@
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: hue_event
|
||||
event_data:
|
||||
id: 5f6b41e54f3226acd9c9ab54a3acb527
|
||||
- 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:
|
||||
|
||||
# --- GARAGE ---
|
||||
|
||||
# Kort tryk på knap 1 → Åbn garage
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ trigger.event.data.type == 'initial_press'
|
||||
and trigger.event.data.subtype == 1 }}
|
||||
- condition: trigger
|
||||
id: open_garage
|
||||
sequence:
|
||||
- service: cover.open_cover
|
||||
target:
|
||||
entity_id: cover.anne
|
||||
|
||||
# Langt tryk på knap 1 → Luk garage
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ trigger.event.data.type == 'long_press'
|
||||
and trigger.event.data.subtype == 1 }}
|
||||
- condition: trigger
|
||||
id: close_garage
|
||||
sequence:
|
||||
- service: cover.close_cover
|
||||
target:
|
||||
entity_id: cover.anne
|
||||
|
||||
|
||||
# --- LYS ---
|
||||
|
||||
# Kort tryk på knap 4 → Sluk alt lys
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ trigger.event.data.type == 'initial_press'
|
||||
and trigger.event.data.subtype == 4 }}
|
||||
- condition: trigger
|
||||
id: lights_off
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
target:
|
||||
entity_id: light.alle_lys
|
||||
|
||||
# Langt tryk på knap 4 → Tænd alt lys
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ trigger.event.data.type == 'long_press'
|
||||
and trigger.event.data.subtype == 4 }}
|
||||
- condition: trigger
|
||||
id: lights_on
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
target:
|
||||
|
||||
Reference in New Issue
Block a user