From 8403e44659902a246486ad83193ef628fb212d80 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Sat, 28 Mar 2020 20:03:22 +0200 Subject: [PATCH] Initial implementation of tablet dashboard --- config/configuration.yaml | 8 +- .../button_card_templates/small_button.yaml | 12 ++ .../covid_19.yaml | 0 .../lights.yaml | 0 .../media_player.yaml | 0 .../{ => home_dashboard}/00_home.yaml | 0 .../{ => home_dashboard}/01_living_room.yaml | 0 .../02_master_bedroom.yaml | 0 .../{ => home_dashboard}/03_kitchen.yaml | 0 .../{ => home_dashboard}/04_bathroom.yaml | 0 .../{ => home_dashboard}/05_hallway.yaml | 0 .../{ => home_dashboard}/06_lights.yaml | 0 .../{ => home_dashboard}/07_media.yaml | 0 .../{ => home_dashboard}/08_network.yaml | 0 .../{ => home_dashboard}/09_system.yaml | 0 .../{ => home_dashboard}/10_covid_19.yaml | 0 .../{ => home_dashboard}/11_test.yaml | 0 config/tablet-lovelace.yaml | 137 ++++++++++++++++++ config/ui-lovelace.yaml | 40 ++--- 19 files changed, 170 insertions(+), 27 deletions(-) create mode 100644 config/lovelace/button_card_templates/small_button.yaml rename config/lovelace/{templates => decluttering_templates}/covid_19.yaml (100%) rename config/lovelace/{templates => decluttering_templates}/lights.yaml (100%) rename config/lovelace/{templates => decluttering_templates}/media_player.yaml (100%) rename config/lovelace/{ => home_dashboard}/00_home.yaml (100%) rename config/lovelace/{ => home_dashboard}/01_living_room.yaml (100%) rename config/lovelace/{ => home_dashboard}/02_master_bedroom.yaml (100%) rename config/lovelace/{ => home_dashboard}/03_kitchen.yaml (100%) rename config/lovelace/{ => home_dashboard}/04_bathroom.yaml (100%) rename config/lovelace/{ => home_dashboard}/05_hallway.yaml (100%) rename config/lovelace/{ => home_dashboard}/06_lights.yaml (100%) rename config/lovelace/{ => home_dashboard}/07_media.yaml (100%) rename config/lovelace/{ => home_dashboard}/08_network.yaml (100%) rename config/lovelace/{ => home_dashboard}/09_system.yaml (100%) rename config/lovelace/{ => home_dashboard}/10_covid_19.yaml (100%) rename config/lovelace/{ => home_dashboard}/11_test.yaml (100%) create mode 100644 config/tablet-lovelace.yaml diff --git a/config/configuration.yaml b/config/configuration.yaml index 20106c7..1572bc9 100644 --- a/config/configuration.yaml +++ b/config/configuration.yaml @@ -24,12 +24,18 @@ lovelace: mode: yaml resources: !include lovelace/resources.yaml dashboards: - lovelace-yaml: + lovelace-main: mode: yaml title: Main Dashboard icon: mdi:home show_in_sidebar: false filename: ui-lovelace.yaml + lovelace-tablet: + mode: yaml + title: Tablet + icon: mdi:tablet-ipad + show_in_sidebar: true + filename: tablet-lovelace.yaml lovelace-floorlan: mode: yaml title: Floorplan diff --git a/config/lovelace/button_card_templates/small_button.yaml b/config/lovelace/button_card_templates/small_button.yaml new file mode 100644 index 0000000..bfbd88d --- /dev/null +++ b/config/lovelace/button_card_templates/small_button.yaml @@ -0,0 +1,12 @@ +small: + size: 30px + hold_action: + action: more-info + double_tap_action: + action: more-info + styles: + card: + - height: 100px + - font-size: 14px + name: + - height: 30px diff --git a/config/lovelace/templates/covid_19.yaml b/config/lovelace/decluttering_templates/covid_19.yaml similarity index 100% rename from config/lovelace/templates/covid_19.yaml rename to config/lovelace/decluttering_templates/covid_19.yaml diff --git a/config/lovelace/templates/lights.yaml b/config/lovelace/decluttering_templates/lights.yaml similarity index 100% rename from config/lovelace/templates/lights.yaml rename to config/lovelace/decluttering_templates/lights.yaml diff --git a/config/lovelace/templates/media_player.yaml b/config/lovelace/decluttering_templates/media_player.yaml similarity index 100% rename from config/lovelace/templates/media_player.yaml rename to config/lovelace/decluttering_templates/media_player.yaml diff --git a/config/lovelace/00_home.yaml b/config/lovelace/home_dashboard/00_home.yaml similarity index 100% rename from config/lovelace/00_home.yaml rename to config/lovelace/home_dashboard/00_home.yaml diff --git a/config/lovelace/01_living_room.yaml b/config/lovelace/home_dashboard/01_living_room.yaml similarity index 100% rename from config/lovelace/01_living_room.yaml rename to config/lovelace/home_dashboard/01_living_room.yaml diff --git a/config/lovelace/02_master_bedroom.yaml b/config/lovelace/home_dashboard/02_master_bedroom.yaml similarity index 100% rename from config/lovelace/02_master_bedroom.yaml rename to config/lovelace/home_dashboard/02_master_bedroom.yaml diff --git a/config/lovelace/03_kitchen.yaml b/config/lovelace/home_dashboard/03_kitchen.yaml similarity index 100% rename from config/lovelace/03_kitchen.yaml rename to config/lovelace/home_dashboard/03_kitchen.yaml diff --git a/config/lovelace/04_bathroom.yaml b/config/lovelace/home_dashboard/04_bathroom.yaml similarity index 100% rename from config/lovelace/04_bathroom.yaml rename to config/lovelace/home_dashboard/04_bathroom.yaml diff --git a/config/lovelace/05_hallway.yaml b/config/lovelace/home_dashboard/05_hallway.yaml similarity index 100% rename from config/lovelace/05_hallway.yaml rename to config/lovelace/home_dashboard/05_hallway.yaml diff --git a/config/lovelace/06_lights.yaml b/config/lovelace/home_dashboard/06_lights.yaml similarity index 100% rename from config/lovelace/06_lights.yaml rename to config/lovelace/home_dashboard/06_lights.yaml diff --git a/config/lovelace/07_media.yaml b/config/lovelace/home_dashboard/07_media.yaml similarity index 100% rename from config/lovelace/07_media.yaml rename to config/lovelace/home_dashboard/07_media.yaml diff --git a/config/lovelace/08_network.yaml b/config/lovelace/home_dashboard/08_network.yaml similarity index 100% rename from config/lovelace/08_network.yaml rename to config/lovelace/home_dashboard/08_network.yaml diff --git a/config/lovelace/09_system.yaml b/config/lovelace/home_dashboard/09_system.yaml similarity index 100% rename from config/lovelace/09_system.yaml rename to config/lovelace/home_dashboard/09_system.yaml diff --git a/config/lovelace/10_covid_19.yaml b/config/lovelace/home_dashboard/10_covid_19.yaml similarity index 100% rename from config/lovelace/10_covid_19.yaml rename to config/lovelace/home_dashboard/10_covid_19.yaml diff --git a/config/lovelace/11_test.yaml b/config/lovelace/home_dashboard/11_test.yaml similarity index 100% rename from config/lovelace/11_test.yaml rename to config/lovelace/home_dashboard/11_test.yaml diff --git a/config/tablet-lovelace.yaml b/config/tablet-lovelace.yaml new file mode 100644 index 0000000..847ab26 --- /dev/null +++ b/config/tablet-lovelace.yaml @@ -0,0 +1,137 @@ +custom_header: + hide_header: true + hide_config: true + hide_help: true + hide_unused: true + +decluttering_templates: !include_dir_merge_named lovelace/decluttering_templates +button_card_templates: !include_dir_merge_named lovelace/button_card_templates + +title: Tablet +views: + - title: Home + path: default_view + icon: "mdi:home" + badges: [] + cards: + # Column 1 + - type: vertical-stack + cards: + - type: vertical-stack + title: Lights + cards: + - type: horizontal-stack + cards: + - type: custom:button-card + template: small + entity: light.all_lights + name: All + - type: custom:button-card + template: small + entity: light.living_room_main_lights + name: Living room + - type: custom:button-card + template: small + entity: light.master_bedroom_main_lights + name: Bedroom + - type: custom:button-card + template: small + entity: light.hallway_main_lights + name: Hallway + - type: horizontal-stack + cards: + - type: custom:button-card + template: small + entity: light.kitchen_main_lights + name: Kitchen + - type: custom:button-card + template: small + entity: light.pc + - type: custom:button-card + template: small + entity: light.bedside_light + name: Bedside + - type: custom:button-card + template: small + entity: light.hallway_entrance_lights + name: Entrance + + - type: horizontal-stack + title: Devices + cards: + - type: custom:button-card + template: small + entity: switch.camera + - type: custom:button-card + template: small + entity: media_player.living_room_tv + - type: custom:button-card + template: small + entity: media_player.nvidia_shield + - type: custom:button-card + template: small + entity: fan.philips_airpurifier + + - type: vertical-stack + title: Sonos + cards: + - type: custom:decluttering-card + template: sonos_media_player + variables: + - player: media_player.master_bedroom + - type: custom:decluttering-card + template: sonos_media_player + variables: + - player: media_player.kitchen + + # Column 2 + - type: vertical-stack + cards: + - type: vertical-stack + title: Manual Overrides + cards: + - type: horizontal-stack + cards: + - type: custom:button-card + template: small + entity: input_select.sonos_leader + - type: custom:button-card + template: small + entity: input_boolean.speech_notifications + - type: custom:button-card + template: small + entity: input_boolean.guest_mode + - type: horizontal-stack + cards: + - type: custom:button-card + template: small + entity: input_boolean.domestina + - type: custom:button-card + template: small + entity: input_boolean.sleep_mode + - type: custom:button-card + template: small + entity: input_boolean.georgi_home + - type: horizontal-stack + title: Sensors + cards: + - type: custom:button-card + template: small + entity: binary_sensor.front_door_on_off_wrapper + - type: custom:button-card + template: small + entity: binary_sensor.living_room_right_window_on_off_wrapper + - type: custom:button-card + template: small + entity: binary_sensor.bedroom_right_window_on_off_wrapper + - type: vertical-stack + title: "___" + cards: + - type: custom:decluttering-card + template: sonos_media_player + variables: + - player: media_player.living_room + - type: custom:decluttering-card + template: sonos_media_player + variables: + - player: media_player.bathroom diff --git a/config/ui-lovelace.yaml b/config/ui-lovelace.yaml index 6c6e3ad..ede7cf7 100644 --- a/config/ui-lovelace.yaml +++ b/config/ui-lovelace.yaml @@ -5,32 +5,20 @@ custom_header: hide_help: true hide_unused: true -decluttering_templates: !include_dir_merge_named lovelace/templates - -button_card_templates: - small: - size: 30px - hold_action: - action: more-info - styles: - card: - - height: 100px - - font-size: 14px - name: - - height: 30px - +decluttering_templates: !include_dir_merge_named lovelace/decluttering_templates +button_card_templates: !include_dir_merge_named lovelace/button_card_templates title: Sarah views: - - !include lovelace/00_home.yaml - - !include lovelace/01_living_room.yaml - - !include lovelace/02_master_bedroom.yaml - - !include lovelace/03_kitchen.yaml - - !include lovelace/04_bathroom.yaml - - !include lovelace/05_hallway.yaml - - !include lovelace/06_lights.yaml - - !include lovelace/07_media.yaml - - !include lovelace/08_network.yaml - - !include lovelace/09_system.yaml - - !include lovelace/10_covid_19.yaml - - !include lovelace/11_test.yaml + - !include lovelace/home_dashboard/00_home.yaml + - !include lovelace/home_dashboard/01_living_room.yaml + - !include lovelace/home_dashboard/02_master_bedroom.yaml + - !include lovelace/home_dashboard/03_kitchen.yaml + - !include lovelace/home_dashboard/04_bathroom.yaml + - !include lovelace/home_dashboard/05_hallway.yaml + - !include lovelace/home_dashboard/06_lights.yaml + - !include lovelace/home_dashboard/07_media.yaml + - !include lovelace/home_dashboard/08_network.yaml + - !include lovelace/home_dashboard/09_system.yaml + - !include lovelace/home_dashboard/10_covid_19.yaml + - !include lovelace/home_dashboard/11_test.yaml