From 16e23014b1e56ea4d530875676b76fb29afdd5d1 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Thu, 8 Dec 2022 21:51:35 +0200 Subject: [PATCH] Automate kitchen string lights --- kitchen-lovelace.yaml | 13 +++++++------ lovelace/advanced_dashboard/08_automations.yaml | 1 + lovelace/home_dashboard/kitchen_dashboard.yaml | 13 +++++++------ lovelace/popup_cards.yaml | 2 +- packages/devices/kitchen/outlet.yaml | 8 ++++++++ packages/routines/good_night.yaml | 5 +++-- 6 files changed, 27 insertions(+), 15 deletions(-) create mode 100644 packages/devices/kitchen/outlet.yaml diff --git a/kitchen-lovelace.yaml b/kitchen-lovelace.yaml index 8b795b3..1fa3014 100644 --- a/kitchen-lovelace.yaml +++ b/kitchen-lovelace.yaml @@ -126,11 +126,12 @@ views: name: Vacuum - type: custom:button-card template: v3_button_brita_water - # - type: custom:button-card - # template: v3_button_power - # entity: switch.kitchen_outlet - # name: Outlet - # variables: - # power_sensor: sensor.kitchen_outlet_electric_consumption_w + - type: custom:button-card + template: v3_button + entity: switch.kitchen_outlet + icon: mdi:string-lights + name: Christmas lights + # variables: + # power_sensor: sensor.kitchen_outlet_electric_consumption_w - !include ./lovelace/popup_cards.yaml diff --git a/lovelace/advanced_dashboard/08_automations.yaml b/lovelace/advanced_dashboard/08_automations.yaml index f7a2b05..487fd75 100644 --- a/lovelace/advanced_dashboard/08_automations.yaml +++ b/lovelace/advanced_dashboard/08_automations.yaml @@ -69,6 +69,7 @@ cards: icon: mdi:lightbulb entities: - automation.living_room_candle_turn_on_after_sunset + - automation.kitchen_christmast_lights_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/kitchen_dashboard.yaml b/lovelace/home_dashboard/kitchen_dashboard.yaml index cf631b0..0971369 100644 --- a/lovelace/home_dashboard/kitchen_dashboard.yaml +++ b/lovelace/home_dashboard/kitchen_dashboard.yaml @@ -107,11 +107,12 @@ name: Vacuum - type: custom:button-card template: v3_button_brita_water - # - type: custom:button-card - # template: v3_button_power - # entity: switch.kitchen_outlet - # name: Outlet - # variables: - # power_sensor: sensor.kitchen_outlet_electric_consumption_w + - type: custom:button-card + template: v3_button + entity: switch.kitchen_outlet + icon: mdi:string-lights + name: Christmas lights + # variables: + # power_sensor: sensor.kitchen_outlet_electric_consumption_w - !include ../popup_cards.yaml diff --git a/lovelace/popup_cards.yaml b/lovelace/popup_cards.yaml index 367d471..76867dc 100644 --- a/lovelace/popup_cards.yaml +++ b/lovelace/popup_cards.yaml @@ -570,7 +570,7 @@ cards: template: brita_card - type: custom:popup-card - entity: sensor.kitchen_outlet_electric_consumption_w + entity: switch.kitchen_outlet title: Kitchen power card: type: entities diff --git a/packages/devices/kitchen/outlet.yaml b/packages/devices/kitchen/outlet.yaml new file mode 100644 index 0000000..b4dbe77 --- /dev/null +++ b/packages/devices/kitchen/outlet.yaml @@ -0,0 +1,8 @@ +automation: + - alias: Kitchen christmast lights · turn on after sunset + trigger: + platform: sun + event: sunset + action: + - service: switch.turn_on + entity_id: switch.kitchen_outlet diff --git a/packages/routines/good_night.yaml b/packages/routines/good_night.yaml index 3e647b1..50e668e 100644 --- a/packages/routines/good_night.yaml +++ b/packages/routines/good_night.yaml @@ -20,8 +20,7 @@ script: - service: light.turn_off entity_id: light.master_bedroom - - service: script.living_room_candle_off - - service: rest_command.isparkle_off + routine_good_night: alias: Routine · Going to sleep @@ -45,9 +44,11 @@ script: - media_player.living_room_tv - switch.cadmium - group.all_radiators + - switch.kitchen_outlet - service: script.browsers_low - service: cover.close_cover entity_id: cover.living_room - service: script.living_room_candle_off + - service: rest_command.isparkle_off