From 055a2eb4843adc6ef4d5747412e9a77054cb8174 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Thu, 1 Dec 2022 16:02:01 +0200 Subject: [PATCH] Implement chips --- kitchen-lovelace.yaml | 187 +++++++-------- .../v3/primitives/v3_chip.yaml | 47 ++++ .../v3/primitives/v3_chip_name.yaml | 30 +++ .../v3/v3_chip_entity_count.yaml | 15 ++ .../v3/v3_chip_person.yaml | 13 ++ .../hallway_dashboard/at_home_dashboard.yaml | 213 +++++------------- .../coming_home_dashboard.yaml | 82 +++---- .../leaving_home_dashboard.yaml | 74 +++--- .../home_dashboard/bathroom_dashboard.yaml | 4 +- .../home_dashboard/bedroom_dashboard.yaml | 18 +- .../guest_bedroom_dashboard.yaml | 4 +- .../home_dashboard/hallway_dashboard.yaml | 24 +- .../home_dashboard/kitchen_dashboard.yaml | 17 +- .../home_dashboard/living_room_dashboard.yaml | 6 +- .../home_dashboard/preferences_dashboard.yaml | 9 +- .../home_dashboard/terrarium_dashboard.yaml | 7 +- lovelace/popup_cards.yaml | 8 +- 17 files changed, 379 insertions(+), 379 deletions(-) create mode 100644 lovelace/button_card_templates/v3/primitives/v3_chip.yaml create mode 100644 lovelace/button_card_templates/v3/primitives/v3_chip_name.yaml create mode 100644 lovelace/button_card_templates/v3/v3_chip_entity_count.yaml create mode 100644 lovelace/button_card_templates/v3/v3_chip_person.yaml diff --git a/kitchen-lovelace.yaml b/kitchen-lovelace.yaml index 1fd72e7..bd8881b 100644 --- a/kitchen-lovelace.yaml +++ b/kitchen-lovelace.yaml @@ -22,100 +22,111 @@ views: .: | #columns { padding: 0 10px; - margin: 0 20px; + margin: 0 30px; grid-gap: 20px; } card: - type: vertical-stack + type: custom:layout-card + layout_type: custom:horizontal-layout + layout: + max_cols: 2 cards: - - type: 'custom:simple-clock-card' - hide_seconds: true - style: | - ha-card { - margin: 10px; - padding: 10px; - } - - type: custom:decluttering-card - template: v3_title - variables: - - title: 🧑‍🍳 Kitchen - - type: horizontal-stack + - type: vertical-stack cards: - - type: custom:button-card - template: v3_badge_temp - entity: sensor.kitchen_weather_temperature - - type: custom:button-card - template: v3_badge_humidity - entity: sensor.kitchen_weather_humidity - - type: custom:button-card - template: v3_badge_icon - entity: binary_sensor.kitchen_motion_occupancy - - type: custom:button-card - template: v3_badge_icon - entity: binary_sensor.kitchen_window_contact - - type: custom:button-card - template: v3_badge_icon - entity: binary_sensor.kitchen_door + - type: 'custom:simple-clock-card' + hide_seconds: true + font_size: 4rem + padding_size: 0px + style: | + ha-card { + background: none; + box-shadow: none; + margin-top: 30px; + margin-bottom: 10px; + text-align: left; + } + - type: horizontal-stack + cards: + - type: custom:button-card + template: v3_chip + entity: sensor.kitchen_weather_temperature + - type: custom:button-card + template: v3_chip + entity: sensor.kitchen_weather_humidity + - type: horizontal-stack + cards: + - type: custom:button-card + template: v3_chip_name + entity: binary_sensor.kitchen_motion_occupancy + name: Motion + - type: custom:button-card + template: v3_chip_name + entity: binary_sensor.kitchen_window_contact + name: Window + - type: custom:button-card + template: v3_chip_name + entity: binary_sensor.kitchen_door + name: Door - - type: custom:decluttering-card - template: v3_section_title - variables: - - title: Lights - - type: horizontal-stack - cards: - - type: custom:button-card - template: v3_button_light - entity: light.kitchen - name: All - - type: custom:button-card - template: v3_button_light - entity: light.kitchen_main - name: Main - - type: custom:button-card - template: v3_button_light - entity: light.kitchen_secondary - name: Secondary + - type: custom:decluttering-card + template: v3_section_title + variables: + - title: Lights + - type: horizontal-stack + cards: + - type: custom:button-card + template: v3_button_light + entity: light.kitchen + name: All + - type: custom:button-card + template: v3_button_light + entity: light.kitchen_main + name: Main + - type: custom:button-card + template: v3_button_light + entity: light.kitchen_secondary + name: Secondary - - type: custom:decluttering-card - template: v3_section_title - variables: - - title: Devices - - type: horizontal-stack - cards: - - type: custom:button-card - template: v3_button - entity: media_player.kitchen - name: Sonos - hold_action: - action: call-service - service: media_player.media_play_pause - service_data: - entity_id: media_player.kitchen - - type: custom:button-card - template: v3_button - entity: binary_sensor.sonos_is_kitchen_grouped - name: Sonos Grouped - tap_action: - action: call-service - service: "[[[ return entity.state == 'on' ? 'script.sonos_kitchen_unjoin' : 'script.sonos_kitchen_join' ]]]" - - type: custom:button-card - template: v3_button_radiator - entity: climate.kitchen_radiator_mode - name: Radiator + - type: custom:decluttering-card + template: v3_section_title + variables: + - title: Devices + - type: horizontal-stack + cards: + - type: custom:button-card + template: v3_button + entity: media_player.kitchen + name: Sonos + hold_action: + action: call-service + service: media_player.media_play_pause + service_data: + entity_id: media_player.kitchen + - type: custom:button-card + template: v3_button + entity: binary_sensor.sonos_is_kitchen_grouped + name: Sonos Grouped + tap_action: + action: call-service + service: "[[[ return entity.state == 'on' ? 'script.sonos_kitchen_unjoin' : 'script.sonos_kitchen_join' ]]]" + - type: custom:button-card + template: v3_button_radiator + entity: climate.kitchen_radiator_mode + name: Radiator - - type: horizontal-stack - cards: - - type: custom:button-card - template: v3_button - entity: vacuum.vacuum - 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: horizontal-stack + cards: + - type: custom:button-card + template: v3_button + entity: vacuum.vacuum + 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 - - !include ./lovelace/popup_cards.yaml + - !include ./lovelace/popup_cards.yaml diff --git a/lovelace/button_card_templates/v3/primitives/v3_chip.yaml b/lovelace/button_card_templates/v3/primitives/v3_chip.yaml new file mode 100644 index 0000000..e2a1abb --- /dev/null +++ b/lovelace/button_card_templates/v3/primitives/v3_chip.yaml @@ -0,0 +1,47 @@ +v3_chip: + variables: + state_size: 14px + background_color: 'var(--v3-background)' + show_name: false + show_icon: true + show_state: true + hold_action: + action: more-info + styles: + grid: + - grid-template-areas: '"i s"' + - grid-template-rows: 1fr + card: + - width: "[[[ return this.___config.show_state ? 'auto' : '38px' ]]]" + - height: 38px + - font-size: 19px + - border-radius: 20px + - padding: "[[[ return this.___config.show_state ? '0 10px' : '0' ]]]" + - box-shadow: none + - --ha-card-background: "[[[ return variables.background_color ]]]" + - border: 2px solid transparent + state: + - align-self: center + - text-overflow: initial + - font-weight: bold + - font-size: "[[[ return variables.state_size ]]]" + - padding-left: 7px + icon: + - position: initial + - width: 100% + - height: auto + - justify-self: center + - align-self: center + - --mdc-icon-size: 20px + entity_picture: + - width: auto + - height: 38px + state: + - value: 'on' + styles: + card: + - background-color: white + - color: black + - border: 2px solid white + icon: + - color: var(--primary-color) diff --git a/lovelace/button_card_templates/v3/primitives/v3_chip_name.yaml b/lovelace/button_card_templates/v3/primitives/v3_chip_name.yaml new file mode 100644 index 0000000..b2d9741 --- /dev/null +++ b/lovelace/button_card_templates/v3/primitives/v3_chip_name.yaml @@ -0,0 +1,30 @@ +v3_chip_name: + template: v3_chip + show_state: false + show_entity_picture: false + show_icon: true + show_name: true + hold_action: + action: more-info + styles: + card: + - width: "[[[ return this.___config.show_name ? 'auto' : '38px' ]]]" + - padding: "[[[ return this.___config.show_name ? '0 10px' : '0' ]]]" + - border: 2px solid transparent + grid: + - grid-template-areas: '"i n"' + - grid-template-rows: 1fr + icon: + - position: initial + - width: 100% + - height: auto + - justify-self: center + - align-self: center + - --mdc-icon-size: 20px + name: + - align-self: center + - text-overflow: initial + - font-weight: bold + - font-size: "[[[ return variables.state_size ]]]" + - padding-left: 7px + - width: auto diff --git a/lovelace/button_card_templates/v3/v3_chip_entity_count.yaml b/lovelace/button_card_templates/v3/v3_chip_entity_count.yaml new file mode 100644 index 0000000..8199179 --- /dev/null +++ b/lovelace/button_card_templates/v3/v3_chip_entity_count.yaml @@ -0,0 +1,15 @@ +v3_chip_entity_count: + variables: + entity_type: + template: v3_chip_name + name: "[[[ return `${entity.state} open ${variables.entity_type}${entity.state > 1 ? 's' : ''}` ]]]" + state: + - value: 0 + operator: '!=' + styles: + card: + - background-color: white + icon: + - color: var(--primary-color) + name: + - color: black diff --git a/lovelace/button_card_templates/v3/v3_chip_person.yaml b/lovelace/button_card_templates/v3/v3_chip_person.yaml new file mode 100644 index 0000000..b175c2e --- /dev/null +++ b/lovelace/button_card_templates/v3/v3_chip_person.yaml @@ -0,0 +1,13 @@ +v3_chip_person: + template: v3_chip + show_state: false + show_entity_picture: true + show_name: false + hold_action: + action: more-info + state: + - value: 'off' + styles: + card: + - filter: grayscale(100%) + - border-color: black diff --git a/lovelace/hallway_dashboard/at_home_dashboard.yaml b/lovelace/hallway_dashboard/at_home_dashboard.yaml index ad347bb..80eb92b 100644 --- a/lovelace/hallway_dashboard/at_home_dashboard.yaml +++ b/lovelace/hallway_dashboard/at_home_dashboard.yaml @@ -19,80 +19,66 @@ card: # Column 1 - type: vertical-stack cards: + - type: 'custom:simple-clock-card' + hide_seconds: true + font_size: 4rem + padding_size: 0px + style: | + ha-card { + background: none; + box-shadow: none; + margin-top: 30px; + text-align: left; + } + - type: horizontal-stack cards: - type: custom:button-card - template: v3_button_person + template: v3_chip_person entity: input_boolean.georgi_home - styles: - card: - - background-image: url("/local/images/people/georgi.jpg") + entity_picture: /local/images/people/georgi.jpg - type: custom:button-card - template: v3_button_person + template: v3_chip_person entity: input_boolean.player_2_home - styles: - card: - - background-image: url("/local/images/people/maya.jpg") - # - type: custom:button-card - # template: v3_button_person - # entity: input_boolean.player_2_home - # styles: - # card: - # - background-image: url("/local/images/people/milena.jpg") + entity_picture: /local/images/people/maya.jpg - type: custom:button-card - template: v3_badge_temp + template: v3_chip entity: sensor.average_temperature + icon: mdi:thermometer - type: custom:button-card - template: v3_badge_humidity + template: v3_chip entity: sensor.average_humidity + icon: mdi:water-percent + - type: horizontal-stack + cards: - type: custom:button-card - template: v3_badge_icon + template: v3_chip_name entity: group.all_motion_sensors icon: | [[[ return entity.state === 'off' ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor'; ]]] + name: Motion tap_action: action: more-info - type: custom:button-card - template: v3_badge_icon + template: v3_chip_entity_count entity: sensor.open_window_count + variables: + entity_type: window icon: | [[[ return entity.state === 0 ? 'mdi:window-closed' : 'mdi:window-open'; ]]] - state: - - value: 0 - operator: '!=' - styles: - card: - - background-color: 'white' - icon: - - color: var(--primary-color) - type: custom:button-card - template: v3_badge_icon + template: v3_chip_entity_count entity: sensor.open_door_count + variables: + entity_type: door icon: | [[[ return entity.state === 0 ? 'mdi:door-closed' : 'mdi:door-open'; ]]] - state: - - value: 0 - operator: '!=' - styles: - card: - - background-color: 'white' - icon: - - color: var(--primary-color) - - - type: 'custom:simple-clock-card' - hide_seconds: true - font_size: 2rem - padding_size: 10px - style: | - ha-card { - margin-top: 10px; - } - type: custom:decluttering-card template: v3_section_title @@ -147,6 +133,15 @@ card: name: "Kitchen" - type: horizontal-stack cards: + - type: custom:button-card + template: v3_tablet_button + entity: media_player.master_bedroom + name: Sonos + hold_action: + action: call-service + service: media_player.media_play_pause + service_data: + entity_id: media_player.master_bedroom - type: custom:button-card template: [v3_button_cover, v3_tablet_button] entity: cover.living_room @@ -158,10 +153,6 @@ card: template: [v3_button_purifier, v3_tablet_button] entity: fan.philips_airpurifier name: Air Purifier - - type: custom:button-card - template: v3_tablet_button - entity: vacuum.vacuum - name: Vacuum - type: custom:button-card template: v3_button_brita_water variables: @@ -189,6 +180,13 @@ card: # Column 2 - type: vertical-stack cards: + - type: custom:weather-card + entity: weather.dark_sky + forecast: false + - type: markdown + content: >- + {% set forecast = states('sensor.dark_sky_hourly_summary') %} + {{ forecast }} - type: custom:decluttering-card template: v3_section_title variables: @@ -196,148 +194,51 @@ card: - type: horizontal-stack cards: - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.living_room name: Living room - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.living_room_main name: Main - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.hue_ambiance_7 - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.living_room_ambient name: Ambient - type: horizontal-stack cards: - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.master_bedroom name: Bedroom - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.master_bedroom_main name: Main - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.bedside name: Bedside - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.kitchen name: Kitchen - type: horizontal-stack cards: - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.hallway_main name: Hallway - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.hallway_entrance name: Entrance - type: custom:button-card - template: v3_tablet_button + template: v3_xs_button entity: light.tradfri_large name: G. Bedroom - - type: custom:decluttering-card - template: v3_section_title - variables: - - title: Media - - - type: horizontal-stack - cards: - - type: custom:button-card - template: v3_xs_button - entity: media_player.master_bedroom - name: Sonos - hold_action: - action: call-service - service: media_player.media_play_pause - service_data: - entity_id: media_player.kitchen - - type: custom:button-card - template: v3_xs_button - show_state: false - entity: script.sonos_volume_10 - icon: mdi:volume-medium - name: Vol 10 - tap_action: - action: call-service - service: script.sonos_volume_10 - - type: custom:button-card - template: v3_xs_button - show_state: false - entity: script.sonos_volume_20 - icon: mdi:volume-high - name: Vol 20 - tap_action: - action: call-service - service: script.sonos_volume_20 - - type: custom:button-card - template: v3_xs_button - 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: v3_xs_button - entity: binary_sensor.sonos_is_living_room_master - name: TV - icon: mdi:speaker-multiple - tap_action: - action: call-service - service: script.sonos_join_tv - - type: horizontal-stack - cards: - - type: custom:button-card - template: v3_xs_button - entity: script.music_play - name: Chill - icon: mdi:music - tap_action: - action: toggle - - type: custom:button-card - template: v3_xs_button - entity: script.music_play - name: Chill 2 - icon: mdi:music - tap_action: - action: call-service - service: script.music_play - service_data: - playlist: "Songs for a Romantic Evening" - shuffle: true - volume_level: 0.1 - - type: custom:button-card - template: v3_xs_button - entity: script.music_play - name: Jazz - icon: mdi:music - tap_action: - action: call-service - service: script.music_play - service_data: - playlist: "Smooth Romantic Evening" - shuffle: true - volume_level: 0.1 - - type: custom:button-card - template: v3_xs_button - entity: script.music_play - name: Retro - icon: mdi:music - tap_action: - action: call-service - service: script.music_play - service_data: - playlist: "Retro" - styles: - card: - - margin-bottom: 8px - - !include ../popup_cards.yaml diff --git a/lovelace/hallway_dashboard/coming_home_dashboard.yaml b/lovelace/hallway_dashboard/coming_home_dashboard.yaml index 1783bde..d072518 100644 --- a/lovelace/hallway_dashboard/coming_home_dashboard.yaml +++ b/lovelace/hallway_dashboard/coming_home_dashboard.yaml @@ -26,88 +26,66 @@ card: - type: markdown content: !include ../../templates/partials/tasks.yaml + - type: 'custom:simple-clock-card' + hide_seconds: true + font_size: 4rem + padding_size: 0px + style: | + ha-card { + background: none; + box-shadow: none; + margin-top: 30px; + text-align: left; + } + - type: horizontal-stack cards: - type: custom:button-card - template: v3_button_person + template: v3_chip_person entity: input_boolean.georgi_home - styles: - card: - - background-image: url("/local/images/people/georgi.jpg") + entity_picture: /local/images/people/georgi.jpg - type: custom:button-card - template: v3_button_person + template: v3_chip_person entity: input_boolean.player_2_home - styles: - card: - - background-image: url("/local/images/people/maya.jpg") - # - type: custom:button-card - # template: v3_button_person - # entity: input_boolean.player_2_home - # styles: - # card: - # - background-image: url("/local/images/people/milena.jpg") + entity_picture: /local/images/people/maya.jpg - type: custom:button-card - template: v3_badge_temp + template: v3_chip entity: sensor.average_temperature + icon: mdi:thermometer - type: custom:button-card - template: v3_badge_humidity + template: v3_chip entity: sensor.average_humidity + icon: mdi:water-percent + - type: horizontal-stack + cards: - type: custom:button-card - template: v3_badge_icon + template: v3_chip_name entity: group.all_motion_sensors icon: | [[[ return entity.state === 'off' ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor'; ]]] + name: Motion tap_action: action: more-info - state: - - value: 0 - operator: '!=' - styles: - card: - - background-color: 'white' - icon: - - color: var(--primary-color) - type: custom:button-card - template: v3_badge_icon + template: v3_chip_entity_count entity: sensor.open_window_count + variables: + entity_type: window icon: | [[[ return entity.state === 0 ? 'mdi:window-closed' : 'mdi:window-open'; ]]] - state: - - value: 0 - operator: '!=' - styles: - card: - - background-color: 'white' - icon: - - color: var(--primary-color) - type: custom:button-card - template: v3_badge_icon + template: v3_chip_entity_count entity: sensor.open_door_count + variables: + entity_type: door icon: | [[[ return entity.state === 0 ? 'mdi:door-closed' : 'mdi:door-open'; ]]] - state: - - value: 0 - operator: '!=' - styles: - card: - - background-color: 'white' - icon: - - color: var(--primary-color) - - - type: 'custom:simple-clock-card' - hide_seconds: true - font_size: 2rem - padding_size: 10px - style: | - ha-card { - margin-top: 10px; - } - type: custom:decluttering-card template: v3_section_title diff --git a/lovelace/hallway_dashboard/leaving_home_dashboard.yaml b/lovelace/hallway_dashboard/leaving_home_dashboard.yaml index 0985b57..65442d8 100644 --- a/lovelace/hallway_dashboard/leaving_home_dashboard.yaml +++ b/lovelace/hallway_dashboard/leaving_home_dashboard.yaml @@ -18,68 +18,68 @@ card: cards: - type: vertical-stack cards: + - type: 'custom:simple-clock-card' + hide_seconds: true + font_size: 4rem + padding_size: 0px + style: | + ha-card { + background: none; + box-shadow: none; + margin-top: 30px; + text-align: left; + } + - type: horizontal-stack cards: - type: custom:button-card - template: v3_button_person + template: v3_chip_person entity: input_boolean.georgi_home - styles: - card: - - background-image: url("/local/images/people/georgi.jpg") + entity_picture: /local/images/people/georgi.jpg - type: custom:button-card - template: v3_button_person + template: v3_chip_person entity: input_boolean.player_2_home - styles: - card: - - background-image: url("/local/images/people/maya.jpg") + entity_picture: /local/images/people/maya.jpg - type: custom:button-card - template: v3_badge_icon + template: v3_chip + entity: sensor.average_temperature + icon: mdi:thermometer + - type: custom:button-card + template: v3_chip + entity: sensor.average_humidity + icon: mdi:water-percent + - type: horizontal-stack + cards: + - type: custom:button-card + template: v3_chip_name entity: group.all_motion_sensors icon: | [[[ return entity.state === 'off' ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor'; ]]] + name: Motion + tap_action: + action: more-info - type: custom:button-card - template: v3_badge_icon + template: v3_chip_entity_count entity: sensor.open_window_count + variables: + entity_type: window icon: | [[[ return entity.state === 0 ? 'mdi:window-closed' : 'mdi:window-open'; ]]] - tap_action: - action: more-info - state: - - value: 0 - operator: '!=' - styles: - card: - - background-color: 'white' - icon: - - color: var(--primary-color) + - type: custom:button-card - template: v3_badge_icon + template: v3_chip_entity_count entity: sensor.open_door_count + variables: + entity_type: door icon: | [[[ return entity.state === 0 ? 'mdi:door-closed' : 'mdi:door-open'; ]]] - state: - - value: 0 - operator: '!=' - styles: - card: - - background-color: 'white' - icon: - - color: var(--primary-color) - - type: 'custom:simple-clock-card' - hide_seconds: true - font_size: 2rem - padding_size: 10px - style: | - ha-card { - margin-top: 10px; - } - type: custom:decluttering-card template: v3_section_title diff --git a/lovelace/home_dashboard/bathroom_dashboard.yaml b/lovelace/home_dashboard/bathroom_dashboard.yaml index e6df963..eb47ccd 100644 --- a/lovelace/home_dashboard/bathroom_dashboard.yaml +++ b/lovelace/home_dashboard/bathroom_dashboard.yaml @@ -31,10 +31,10 @@ - type: horizontal-stack cards: - type: custom:button-card - template: v3_badge_temp + template: v3_chip entity: sensor.bathroom_weather_temperature - type: custom:button-card - template: v3_badge_humidity + template: v3_chip entity: sensor.bathroom_weather_humidity - type: custom:decluttering-card diff --git a/lovelace/home_dashboard/bedroom_dashboard.yaml b/lovelace/home_dashboard/bedroom_dashboard.yaml index bf2cfd2..c008734 100644 --- a/lovelace/home_dashboard/bedroom_dashboard.yaml +++ b/lovelace/home_dashboard/bedroom_dashboard.yaml @@ -30,29 +30,29 @@ - type: horizontal-stack cards: - type: custom:button-card - template: v3_badge_temp + template: v3_chip entity: sensor.bedroom_weather_temperature - state_display: "[[[return entity.state.split(' ')[0] + '°']]]" - type: custom:button-card - template: v3_badge_humidity + template: v3_chip entity: sensor.bedroom_weather_humidity - type: custom:button-card - template: v3_badge + template: v3_chip entity: sensor.purifier_air_quality state_display: "[[[return entity.state.split(' ')[0] + ' pm2.5']]]" - variables: - state_size: "11px" - type: horizontal-stack cards: - type: custom:button-card - template: v3_badge_icon + template: v3_chip_name entity: binary_sensor.bedroom_left_window_contact + name: Left window - type: custom:button-card - template: v3_badge_icon + template: v3_chip_name entity: binary_sensor.bedroom_right_window_contact + name: Right window - type: custom:button-card - template: v3_badge_icon + template: v3_chip_name entity: binary_sensor.bedroom_door_contact + name: Door - type: custom:decluttering-card template: v3_section_title diff --git a/lovelace/home_dashboard/guest_bedroom_dashboard.yaml b/lovelace/home_dashboard/guest_bedroom_dashboard.yaml index 68b9432..88193a5 100644 --- a/lovelace/home_dashboard/guest_bedroom_dashboard.yaml +++ b/lovelace/home_dashboard/guest_bedroom_dashboard.yaml @@ -36,10 +36,10 @@ # card: # - background-image: url("/local/images/people/milena.jpg") - type: custom:button-card - template: v3_badge_temp + template: v3_chip entity: sensor.guest_bedroom_weather_temperature - type: custom:button-card - template: v3_badge_humidity + template: v3_chip entity: sensor.guest_bedroom_weather_humidity - type: custom:decluttering-card diff --git a/lovelace/home_dashboard/hallway_dashboard.yaml b/lovelace/home_dashboard/hallway_dashboard.yaml index 5c4fc3b..d445886 100644 --- a/lovelace/home_dashboard/hallway_dashboard.yaml +++ b/lovelace/home_dashboard/hallway_dashboard.yaml @@ -30,25 +30,25 @@ - type: horizontal-stack cards: - type: custom:button-card - template: v3_badge_temp + template: v3_chip entity: sensor.hallway_weather_temperature - type: custom:button-card - template: v3_badge_humidity + template: v3_chip entity: sensor.hallway_weather_humidity - - type: custom:button-card - template: v3_badge_icon - entity: group.hallway_motion - type: horizontal-stack cards: - type: custom:button-card - template: v3_badge_icon - entity: binary_sensor.hallway_motion_occupancy - - type: custom:button-card - template: v3_badge_icon - entity: binary_sensor.hallway_motion_2_occupancy - - type: custom:button-card - template: v3_badge_icon + template: v3_chip_name entity: binary_sensor.front_door_contact + name: Front door + - type: custom:button-card + template: v3_chip_name + entity: binary_sensor.hallway_motion_occupancy + name: Motion + - type: custom:button-card + template: v3_chip_name + entity: binary_sensor.hallway_motion_2_occupancy + name: Motion 2 - type: custom:decluttering-card template: v3_section_title diff --git a/lovelace/home_dashboard/kitchen_dashboard.yaml b/lovelace/home_dashboard/kitchen_dashboard.yaml index 81ad7f8..cf631b0 100644 --- a/lovelace/home_dashboard/kitchen_dashboard.yaml +++ b/lovelace/home_dashboard/kitchen_dashboard.yaml @@ -30,22 +30,25 @@ - type: horizontal-stack cards: - type: custom:button-card - template: v3_badge_temp + template: v3_chip entity: sensor.kitchen_weather_temperature - type: custom:button-card - template: v3_badge_humidity + template: v3_chip entity: sensor.kitchen_weather_humidity - - type: custom:button-card - template: v3_badge_icon - entity: binary_sensor.kitchen_motion_occupancy - type: horizontal-stack cards: - type: custom:button-card - template: v3_badge_icon + template: v3_chip_name entity: binary_sensor.kitchen_window_contact + name: Window - type: custom:button-card - template: v3_badge_icon + template: v3_chip_name entity: binary_sensor.kitchen_door + name: Door + - type: custom:button-card + template: v3_chip_name + entity: binary_sensor.kitchen_motion_occupancy + name: Motion - type: custom:decluttering-card template: v3_section_title diff --git a/lovelace/home_dashboard/living_room_dashboard.yaml b/lovelace/home_dashboard/living_room_dashboard.yaml index 5a99cf3..39a9dd6 100644 --- a/lovelace/home_dashboard/living_room_dashboard.yaml +++ b/lovelace/home_dashboard/living_room_dashboard.yaml @@ -30,15 +30,13 @@ - type: horizontal-stack cards: - type: custom:button-card - template: v3_chip + template: v3_chip_person entity: input_boolean.georgi_home entity_picture: /local/images/people/georgi.jpg - show_state: false - type: custom:button-card - template: v3_chip + template: v3_chip_person entity: input_boolean.player_2_home entity_picture: /local/images/people/maya.jpg - show_state: false - type: custom:button-card template: v3_chip entity: binary_sensor.living_room_right_window_contact diff --git a/lovelace/home_dashboard/preferences_dashboard.yaml b/lovelace/home_dashboard/preferences_dashboard.yaml index c8d88e6..481a11a 100644 --- a/lovelace/home_dashboard/preferences_dashboard.yaml +++ b/lovelace/home_dashboard/preferences_dashboard.yaml @@ -30,14 +30,17 @@ - type: horizontal-stack cards: - type: custom:button-card - template: v3_badge + template: v3_chip_name entity: binary_sensor.someone_home + name: Someone home - type: custom:button-card - template: v3_badge + template: v3_chip_name entity: binary_sensor.someone_sleeping + name: Sleeping - type: custom:button-card - template: v3_badge + template: v3_chip entity: sensor.house_mode + icon: mdi:home - type: custom:decluttering-card template: v3_section_title diff --git a/lovelace/home_dashboard/terrarium_dashboard.yaml b/lovelace/home_dashboard/terrarium_dashboard.yaml index f3b29dd..d61cc0c 100644 --- a/lovelace/home_dashboard/terrarium_dashboard.yaml +++ b/lovelace/home_dashboard/terrarium_dashboard.yaml @@ -30,14 +30,15 @@ - type: horizontal-stack cards: - type: custom:button-card - template: v3_badge_temp + template: v3_chip entity: sensor.terrarium_weather_temperature - type: custom:button-card - template: v3_badge_humidity + template: v3_chip entity: sensor.terrarium_weather_humidity - type: custom:button-card - template: v3_badge_icon + template: v3_chip_name entity: binary_sensor.terrarium_cam_motion + name: Motion - type: custom:decluttering-card template: v3_section_title variables: diff --git a/lovelace/popup_cards.yaml b/lovelace/popup_cards.yaml index 0f255b6..be86170 100644 --- a/lovelace/popup_cards.yaml +++ b/lovelace/popup_cards.yaml @@ -17,7 +17,7 @@ cards: - type: glance entities: - entity: binary_sensor.kitchen_motion_occupancy - - entity: sensor.kitchen_motion_illuminance + - entity: sensor.kitchen_motion_illuminance_lux - entity: sensor.kitchen_motion_battery - type: "custom:mini-graph-card" animate: true @@ -28,7 +28,7 @@ cards: average: true extrema: true entities: - - entity: sensor.kitchen_motion_illuminance + - entity: sensor.kitchen_motion_illuminance_lux - type: custom:popup-card entity: group.hallway_motion @@ -40,7 +40,7 @@ cards: entities: - entity: binary_sensor.hallway_motion_occupancy - entity: binary_sensor.hallway_motion_2_occupancy - - entity: sensor.hallway_motion_illuminance + - entity: sensor.hallway_motion_illuminance_lux - entity: sensor.hallway_motion_battery - type: "custom:mini-graph-card" @@ -52,7 +52,7 @@ cards: average: true extrema: true entities: - - entity: sensor.hallway_motion_illuminance + - entity: sensor.hallway_motion_illuminance_lux - type: custom:popup-card entity: sensor.mercury_temperature