From 735bcfec419c2136b22699ca089d45e08355aabe Mon Sep 17 00:00:00 2001 From: Liam Woodleigh-Hardinge Date: Sat, 29 Jun 2024 16:40:06 +0200 Subject: [PATCH] feat: Set up living room lights --- .homekit/homekit.yaml | 41 -------------- automations/apple_watch.yaml | 2 +- automations/lights.yaml | 4 +- includes/binary_sensors.yaml | 18 +----- includes/ios.yaml | 4 +- scripts.yaml | 4 +- ui-lovelace.yaml | 107 +++++++++++++++++++---------------- 7 files changed, 66 insertions(+), 114 deletions(-) diff --git a/.homekit/homekit.yaml b/.homekit/homekit.yaml index 4d203a3..e983777 100644 --- a/.homekit/homekit.yaml +++ b/.homekit/homekit.yaml @@ -34,44 +34,3 @@ # Input Selects - input_select.sleep_mode - # Lights (Already added by Philips Hue / Nanoleaf) - - # # Bathroom - # - light.bathroom_toilet - # - light.bathroom_mirror - # - light.bathroom_shower - - # # Bedroom - # - light.bedroom_ceiling - # - light.bedside_lamp - - # # Living room - # - light.corner_lamp - # - light.table_lamp - # - light.java_lamp - # - light.elements - - # light.tv_ambilight: - - # Hallway - # - light.hallway_entrance - # - light.hallway_spot - - # Kitchen - # - light.cabinet_left - # - light.cabinet_middle - # - light.cabinet_right - # - light.bench_upper_strip - # - light.bench_lower_strip - # - light.standing_lamp - - # media_player.speakers - # media_player.living_room_tv - - # media_player.kitchen_hub - # media_player.bedroom_hub - # media_player.spotify - # media_player.bathroom_speaker - - # Climate - # Already added by Tado \ No newline at end of file diff --git a/automations/apple_watch.yaml b/automations/apple_watch.yaml index e90b8dd..c2b672d 100644 --- a/automations/apple_watch.yaml +++ b/automations/apple_watch.yaml @@ -74,7 +74,7 @@ 'LIVING_ROOM': 'light.living_room_lights', 'HALLWAY': 'light.hallway_lights', 'BATHROOM': 'light.bathroom_lights', - 'BATHROOM': 'light.cabinet_lights', + 'BATHROOM': 'light.pantry_lights', }[wait.trigger.event.data.actionName] }} - service: "{{ iphone }}" data: diff --git a/automations/lights.yaml b/automations/lights.yaml index 68b838c..64768a2 100644 --- a/automations/lights.yaml +++ b/automations/lights.yaml @@ -152,7 +152,7 @@ entity_id: light.hallway_lights transition: 1 -- alias: "Light: turn on cabinet if motion (backup automation)" +- alias: "Light: turn on pantry if motion (backup automation)" trigger: platform: state entity_id: binary_sensor.motion_sensor_hallway @@ -164,7 +164,7 @@ action: - service: light.turn_on data: - entity_id: light.cabinet_lights + entity_id: light.pantry_lights transition: 1 - alias: "Light: turn on bedroom if motion (backup automation)" diff --git a/includes/binary_sensors.yaml b/includes/binary_sensors.yaml index 5d05369..3b65429 100644 --- a/includes/binary_sensors.yaml +++ b/includes/binary_sensors.yaml @@ -1,18 +1,4 @@ --- -- platform: workday - country: !secret country_code - workdays: [mon, tue, wed, thu] - -- platform: workday - name: Day before workday sensor - country: !secret country_code - workdays: [sun, mon, tue, wed] - -- platform: workday - name: Vacuum day - country: !secret country_code - workdays: [mon, tue, thu, sun] - - platform: template sensors: someone_showering: @@ -119,9 +105,9 @@ {% set living_room_lights_on = is_state("light.living_room_lights", "on") %} {% set bathroom_lights_on = is_state("light.bathroom_lights", "on") %} {% set hallway_lights_on = is_state("light.hallway_lights", "on") %} - {% set cabinet_lights_on = is_state("light.cabinet_lights", "on") %} + {% set pantry_lights_on = is_state("light.pantry_lights", "on") %} {% set kitchen_lights_on = is_state("light.kitchen_lights", "on") %} - {{ bathroom_lights_on or bedroom_lights_on or living_room_lights_on or hallway_lights_on or cabinet_lights_on }} + {{ bathroom_lights_on or bedroom_lights_on or living_room_lights_on or hallway_lights_on or pantry_lights_on }} anything_on: friendly_name: Anything is on diff --git a/includes/ios.yaml b/includes/ios.yaml index 8601c02..8d47df9 100644 --- a/includes/ios.yaml +++ b/includes/ios.yaml @@ -66,8 +66,8 @@ push: title: Bathroom - identifier: HALLWAY title: Hallway - - identifier: CABINET - title: Cabinet + - identifier: PANTRY + title: pantry - name: Set temperature identifier: set_temperature diff --git a/scripts.yaml b/scripts.yaml index e3d42e6..cc3e5b2 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -210,11 +210,11 @@ flash_bedroom: # - switch.adaptive_lighting_living_room # - switch.adaptive_lighting_hallway # - switch.adaptive_lighting_bathroom -# - switch.adaptive_lighting_cabinet +# - switch.adaptive_lighting_pantry # - switch.adaptive_lighting_office_lights # lights: # - light.hallway_lights -# - light.cabinet_lights +# - light.pantry_lights # - light.bedroom_lights # - light.corner_lamp # - light.standing_lamp diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml index fbfe437..d95e235 100644 --- a/ui-lovelace.yaml +++ b/ui-lovelace.yaml @@ -32,24 +32,30 @@ views: - type: vertical-stack cards: - entities: - - entities: - - light.corner_lamp - - light.table_lamp - - light.java_lamp - - light.standing_lamp - - entity: scene.living_room_chill - name: 'Scene: Chill' - icon: mdi:script-outline - - entity: scene.living_room_energize - name: 'Scene: Energize' - icon: mdi:script-outline - type: custom:fold-entity-row + - type: custom:fold-entity-row head: color_picker: true entity: light.living_room_lights name: Living type: custom:slider-entity-row icon: mdi:sofa + entities: + - light.entrance_spot_1 + - light.entrance_spot_2 + - light.entrance_spot_3 + - light.entrance_spot_4 + - light.living_room_middle_spot_1 + - light.living_room_middle_spot_2 + - light.living_room_middle_spot_3 + - light.living_room_middle_spot_4 + - light.standing_lamp + # - entity: scene.living_room_chill + # name: "Scene: Chill" + # icon: mdi:script-outline + # - entity: scene.living_room_energize + # name: "Scene: Energize" + # icon: mdi:script-outline + - type: custom:fold-entity-row head: entity: light.kitchen_lights @@ -57,56 +63,57 @@ views: icon: mdi:fridge type: custom:slider-entity-row entities: - - light.cabinet_lights - - light.bench_upper_strip - - light.bench_lower_strip - - light.hallway_spot - - light.standing_lamp - - entities: - - light.hallway_entrance - - light.hallway_spot - - entity: scene.bathroom_nightlight - name: 'Scene: Nightlight' - icon: mdi:script-outline - type: custom:fold-entity-row - head: - entity: light.hallway_lights - name: Hallway - icon: mdi:hanger - type: custom:slider-entity-row + - light.kitchen_bench_upper_strip + - light.kitchen_bench_lower_strip + - light.kitchen_spot_1 + - light.kitchen_spot_2 + - light.kitchen_spot_3 + - light.kitchen_spot_4 + - light.table_lamp + - type: custom:fold-entity-row head: color_picker: true - entity: light.cabinet_lights - name: Cabinet + entity: light.pantry_lights + name: pantry type: custom:slider-entity-row icon: mdi:wardrobe entities: - - light.cabinet_left - - light.cabinet_middle - - light.cabinet_right - - entities: - - light.bedroom_ceiling - - light.bedside_lamp - type: custom:fold-entity-row + - light.pantry_spot_top + - light.pantry_spot_middle + - light.pantry_spot_bottom + + - type: custom:fold-entity-row head: entity: light.bedroom_lights icon: mdi:bed-double type: custom:slider-entity-row name: Bedroom - - entities: - - light.bathroom_mirror - - light.bathroom_toilet - - light.bathroom_shower - - entity: scene.bathroom_energize - name: 'Scene: Energize' - icon: mdi:script-outline - type: custom:fold-entity-row + entities: + - light.bedside_lamp_left + - light.bedside_lamp_right + + - type: custom:fold-entity-row + head: + entity: light.hallway_lights + name: Hallway + icon: mdi:door + type: custom:slider-entity-row + entities: + - light.hallway + + - type: custom:fold-entity-row head: entity: light.bathroom_lights name: Bathroom icon: mdi:shower type: custom:slider-entity-row + entities: + - light.bathroom_back + - light.bathroom_entrance + - light.bathroom_middle_hallway + - light.bathroom_middle_sink + show_header_toggle: false title: Lights type: entities @@ -116,7 +123,7 @@ views: name: false icon: false control: true - decimals: '1' + decimals: "1" - cards: - cards: - color: auto @@ -136,7 +143,7 @@ views: service: input_select.select_option service_data: entity_id: input_select.sleep_mode - option: 'off' + option: "off" type: custom:button-card - color: auto entity: input_select.sleep_mode @@ -271,7 +278,7 @@ views: service_data: entity_id: - switch.adaptive_lighting_hallway - - switch.adaptive_lighting_cabinet + - switch.adaptive_lighting_pantry - switch.adaptive_lighting_living_room - switch.adaptive_lighting_office - switch.adaptive_lighting_bedroom @@ -282,7 +289,7 @@ views: - light.bedroom_lights - light.bathroom_lights - light.hallway_lights - - light.cabinet_lights + - light.pantry_lights - light.office_lights - light.kitchen_lights manual_control: false