Skip to content

Commit

Permalink
feat: Set up living room lights in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
liamwh committed Jun 29, 2024
1 parent 05c760d commit 7b145c1
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 114 deletions.
41 changes: 0 additions & 41 deletions .homekit/homekit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion automations/apple_watch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions automations/lights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)"
Expand Down
18 changes: 2 additions & 16 deletions includes/binary_sensors.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions includes/ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
107 changes: 57 additions & 50 deletions ui-lovelace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,81 +32,88 @@ 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
name: Kitchen
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
Expand All @@ -116,7 +123,7 @@ views:
name: false
icon: false
control: true
decimals: '1'
decimals: "1"
- cards:
- cards:
- color: auto
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7b145c1

Please sign in to comment.