Add button-card. Use for lights on home dashboard

This commit is contained in:
2020-03-28 15:23:08 +02:00
parent 9faf505327
commit 548d5257f5
3 changed files with 52 additions and 57 deletions
+37 -57
View File
@@ -6,64 +6,44 @@ cards:
# Column 1: Active Controls # Column 1: Active Controls
- type: vertical-stack - type: vertical-stack
cards: cards:
- type: glance - type: vertical-stack
title: Lights title: Lights
entities: cards:
- entity: light.all_lights - type: horizontal-stack
name: All cards:
tap_action: - type: custom:button-card
action: call-service template: light
service: light.toggle entity: light.all_lights
service_data: name: All
entity_id: light.all_lights - type: custom:button-card
- entity: light.living_room_main_lights template: light
name: Living room entity: light.living_room_main_lights
tap_action: name: Living room
action: call-service - type: custom:button-card
service: light.toggle template: light
service_data: entity: light.master_bedroom_main_lights
entity_id: light.living_room_main_lights name: Bedroom
- entity: light.pc - type: custom:button-card
tap_action: template: light
action: call-service entity: light.hallway_main_lights
service: light.toggle name: Hallway
service_data: - type: horizontal-stack
entity_id: light.pc cards:
- entity: light.master_bedroom_main_lights - type: custom:button-card
name: Bedroom template: light
tap_action: entity: light.kitchen_main_lights
action: call-service name: Kitchen
service: light.toggle - type: custom:button-card
service_data: template: light
entity_id: light.master_bedroom_main_lights entity: light.pc
- entity: light.bedside_light - type: custom:button-card
name: Bedside template: light
tap_action: entity: light.bedside_light
action: call-service name: Bedside
service: light.toggle - type: custom:button-card
service_data: template: light
entity_id: light.bedside_light entity: light.hallway_entrance_lights
- entity: light.kitchen_main_lights name: Entrance
name: Kitchen
tap_action:
action: call-service
service: light.toggle
service_data:
entity_id: light.kitchen_main_lights
- entity: light.hallway_entrance_lights
name: Entrance
tap_action:
action: call-service
service: light.toggle
service_data:
entity_id: light.hallway_entrance_lights
- entity: light.hallway_main_lights
name: Hallway
tap_action:
action: call-service
service: light.toggle
service_data:
entity_id: light.hallway_main_lights
- type: entities - type: entities
title: Devices title: Devices
+2
View File
@@ -1,5 +1,7 @@
- type: module - type: module
url: /hacsfiles/aftership-card/aftership-card.js url: /hacsfiles/aftership-card/aftership-card.js
- type: module
url: /hacsfiles/button-card/button-card.js
- type: module - type: module
url: /hacsfiles/config-template-card/config-template-card.js url: /hacsfiles/config-template-card/config-template-card.js
- type: module - type: module
+13
View File
@@ -7,6 +7,19 @@ custom_header:
decluttering_templates: !include_dir_merge_named lovelace/templates decluttering_templates: !include_dir_merge_named lovelace/templates
button_card_templates:
light:
size: 30px
hold_action:
action: more-info
styles:
card:
- height: 100px
- font-size: 14px
name:
- height: 30px
title: Sarah title: Sarah
views: views:
- !include lovelace/00_home.yaml - !include lovelace/00_home.yaml