From ca3db9d5762db4bf42ad0359fbd268f1642e2d39 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Fri, 1 May 2020 21:25:56 +0300 Subject: [PATCH] Add bathroom and hallway dashboards --- config/advanced-lovelace.yaml | 1 - .../advanced_dashboard/04_bathroom.yaml | 8 -- .../home_dashboard/bathroom_dashboard.yaml | 73 +++++++++++++++++++ .../home_dashboard/hallway_dashboard.yaml | 55 ++++++++++++++ config/ui-lovelace.yaml | 10 +++ 5 files changed, 138 insertions(+), 9 deletions(-) delete mode 100644 config/lovelace/advanced_dashboard/04_bathroom.yaml create mode 100644 config/lovelace/home_dashboard/bathroom_dashboard.yaml create mode 100644 config/lovelace/home_dashboard/hallway_dashboard.yaml diff --git a/config/advanced-lovelace.yaml b/config/advanced-lovelace.yaml index 0c5b043..65e5474 100644 --- a/config/advanced-lovelace.yaml +++ b/config/advanced-lovelace.yaml @@ -15,7 +15,6 @@ views: - !include lovelace/advanced_dashboard/01_living_room.yaml - !include lovelace/advanced_dashboard/02_master_bedroom.yaml - !include lovelace/advanced_dashboard/03_kitchen.yaml - - !include lovelace/advanced_dashboard/04_bathroom.yaml - !include lovelace/advanced_dashboard/05_hallway.yaml - !include lovelace/advanced_dashboard/06_lights.yaml - !include lovelace/advanced_dashboard/07_media.yaml diff --git a/config/lovelace/advanced_dashboard/04_bathroom.yaml b/config/lovelace/advanced_dashboard/04_bathroom.yaml deleted file mode 100644 index 1766412..0000000 --- a/config/lovelace/advanced_dashboard/04_bathroom.yaml +++ /dev/null @@ -1,8 +0,0 @@ -title: Bathroom -path: bathroom -icon: "mdi:shower-head" -cards: - - type: custom:decluttering-card - template: sonos_media_player - variables: - - player: media_player.bathroom diff --git a/config/lovelace/home_dashboard/bathroom_dashboard.yaml b/config/lovelace/home_dashboard/bathroom_dashboard.yaml new file mode 100644 index 0000000..2af0450 --- /dev/null +++ b/config/lovelace/home_dashboard/bathroom_dashboard.yaml @@ -0,0 +1,73 @@ +- type: custom:mod-card + style: + layout-card: + $: + .: | + #columns { + padding: 0 10px; + } + #columns .column { + padding: 10px 10px; + } + card: + type: custom:layout-card + layout: horizontal + max_columns: 1 + cards: + - type: vertical-stack + cards: + - type: vertical-stack + title: Media + cards: + - type: custom:decluttering-card + template: sonos_media_player + variables: + - player: media_player.bathroom + - sync_volume: false + - type: horizontal-stack + cards: + - type: custom:button-card + template: xs + entity: sensor.philip_defranco + name: PDS + tap_action: + action: call-service + service: script.youtube_play_latest_pds + - type: custom:button-card + template: xs + entity: script.music_play + name: Chill + icon: mdi:music + tap_action: + action: toggle + - type: custom:button-card + template: xs + entity: script.music_play + name: Retro + icon: mdi:music + tap_action: + action: call-service + service: script.music_play + service_data: + playlist: "Retro" + - type: custom:button-card + template: + - xs + - with_state_background + entity: binary_sensor.sonos_is_bedroom_master + name: Bedroom + icon: mdi:speaker-multiple + tap_action: + action: call-service + service: script.sonos_join_bedroom + - type: custom:button-card + template: + - xs + - with_state_background + entity: binary_sensor.sonos_is_living_room_master + name: TV + icon: mdi:speaker-multiple + tap_action: + action: call-service + service: script.sonos_join_tv + diff --git a/config/lovelace/home_dashboard/hallway_dashboard.yaml b/config/lovelace/home_dashboard/hallway_dashboard.yaml new file mode 100644 index 0000000..8f7ccc8 --- /dev/null +++ b/config/lovelace/home_dashboard/hallway_dashboard.yaml @@ -0,0 +1,55 @@ +- type: custom:mod-card + style: + layout-card: + $: + .: | + #columns { + padding: 0 10px; + } + #columns .column { + padding: 10px 10px; + } + card: + type: custom:layout-card + layout: horizontal + max_columns: 1 + cards: + - type: vertical-stack + cards: + - type: horizontal-stack + title: Lights + cards: + - type: custom:button-card + template: default + entity: light.hallway_all_lights + name: Hallway + - type: custom:button-card + template: default + entity: light.hallway_entrance_lights + name: Entrance + - type: custom:button-card + template: default + entity: light.hallway_main_lights + name: Main + + - type: horizontal-stack + cards: + - type: custom:button-card + template: + - default + - with_state_indicator + entity: binary_sensor.motion_2_ias_zone + name: Hallway + variables: + state_indicator_id: automation.lighting_hallway_day_mode_motion_turn_lights_on + - type: custom:button-card + template: + - small + - progress + entity: sensor.motion_2_illuminance + name: Lux + variables: + min_value: 0 + max_value: 1000 + normal_value: 1000 + diff --git a/config/ui-lovelace.yaml b/config/ui-lovelace.yaml index 030036f..893ce6e 100644 --- a/config/ui-lovelace.yaml +++ b/config/ui-lovelace.yaml @@ -32,3 +32,13 @@ views: icon: "mdi:chef-hat" panel: true cards: !include lovelace/home_dashboard/kitchen_dashboard.yaml + - title: Bathroom + path: bathroom + icon: "mdi:shower-head" + panel: true + cards: !include lovelace/home_dashboard/bathroom_dashboard.yaml + - title: Hallway + path: hallway + icon: "mdi:door-closed" + panel: true + cards: !include lovelace/home_dashboard/hallway_dashboard.yaml