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