From ce186c69b63a7f1c3779fa61c3e3dd25e4475fee Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Wed, 7 Dec 2022 19:27:58 +0200 Subject: [PATCH] Add living room candle light --- .../advanced_dashboard/08_automations.yaml | 1 + .../home_dashboard/living_room_dashboard.yaml | 10 +++ packages/devices/living_room/candle.yaml | 76 +++++++++++++++++++ packages/routines/good_night.yaml | 2 + 4 files changed, 89 insertions(+) create mode 100644 packages/devices/living_room/candle.yaml diff --git a/lovelace/advanced_dashboard/08_automations.yaml b/lovelace/advanced_dashboard/08_automations.yaml index 6cc740d..f7a2b05 100644 --- a/lovelace/advanced_dashboard/08_automations.yaml +++ b/lovelace/advanced_dashboard/08_automations.yaml @@ -68,6 +68,7 @@ cards: show_header_toggle: false icon: mdi:lightbulb entities: + - automation.living_room_candle_turn_on_after_sunset - automation.lighting_turn_on_ceiling_lights_after_sunset - automation.lighting_turn_off_all_lights_after_sunrise - type: divider diff --git a/lovelace/home_dashboard/living_room_dashboard.yaml b/lovelace/home_dashboard/living_room_dashboard.yaml index 1f3b0c5..f7e99e5 100644 --- a/lovelace/home_dashboard/living_room_dashboard.yaml +++ b/lovelace/home_dashboard/living_room_dashboard.yaml @@ -109,6 +109,16 @@ template: v3_button entity: light.light_lohas_2 name: Ambient 2nd + - type: horizontal-stack + cards: + - type: custom:button-card + template: v3_button + entity: script.living_room_candle_on + name: Candle + icon: mdi:candle + show_state: false + tap_action: + action: more-info - type: vertical-stack cards: diff --git a/packages/devices/living_room/candle.yaml b/packages/devices/living_room/candle.yaml new file mode 100644 index 0000000..93d373b --- /dev/null +++ b/packages/devices/living_room/candle.yaml @@ -0,0 +1,76 @@ +script: + living_room_candle: + alias: Living Room · Candle 1 · On + sequence: + - service: mqtt.publish + data_template: + topic: cmnd/ir_blaster_1/IRSend + payload: "{\"Protocol\":\"NEC\",\"Bits\":32,\"Data\":\"{{ command }}\"}" + living_room_candle_on: + alias: "Living room candle · on" + sequence: + - service: script.living_room_candle + data: + command: "0x01FE48B7" + living_room_candle_off: + alias: "Living room candle · off" + sequence: + - service: script.living_room_candle + data: + command: "0x01FEE01F" + living_room_candle_25: + alias: "Living room candle · 25%" + sequence: + - service: script.living_room_candle + data: + command: "0x01FE906F" + living_room_candle_50: + alias: "Living room candle · 50%" + sequence: + - service: script.living_room_candle + data: + command: "0x01FE609F" + living_room_candle_75: + alias: "Living room candle · 75%" + sequence: + - service: script.living_room_candle + data: + command: "0x01FEC03F" + living_room_candle_100: + alias: "Living room candle · 100%" + sequence: + - service: script.living_room_candle + data: + command: "0x01FE7887" + living_room_candle_2h: + alias: "Living room candle · 2h" + sequence: + - service: script.living_room_candle + data: + command: "0x01FE30CF" + living_room_candle_4h: + alias: "Living room candle · 4h" + sequence: + - service: script.living_room_candle + data: + command: "0x01FED827" + living_room_candle_6h: + alias: "Living room candle · 6h" + sequence: + - service: script.living_room_candle + data: + command: "0x01FE708F" + living_room_candle_8h: + alias: "Living room candle · 8h" + sequence: + - service: script.living_room_candle + data: + command: "0x01FEF00F" + +automation: + - alias: Living room candle · turn on after sunset + trigger: + platform: sun + event: sunset + action: + - service: script.living_room_candle_on diff --git a/packages/routines/good_night.yaml b/packages/routines/good_night.yaml index 19827ae..df0441c 100644 --- a/packages/routines/good_night.yaml +++ b/packages/routines/good_night.yaml @@ -20,6 +20,7 @@ script: - service: light.turn_off entity_id: light.master_bedroom + - service: script.living_room_candle_off routine_good_night: alias: Routine · Going to sleep @@ -48,3 +49,4 @@ script: - service: cover.close_cover entity_id: cover.living_room + - service: script.living_room_candle_off