From 800bc5b7ea43decbb6e530ec62ce363ea813f33c Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Tue, 17 Mar 2026 21:20:46 +0100 Subject: [PATCH] tror det virker nu --- include/automations/bryggerbutton.yaml | 62 +++++++++++++------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/include/automations/bryggerbutton.yaml b/include/automations/bryggerbutton.yaml index db99029..7b3aafd 100644 --- a/include/automations/bryggerbutton.yaml +++ b/include/automations/bryggerbutton.yaml @@ -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: