Change cover icon in buttons

This commit is contained in:
2021-04-30 18:51:16 +03:00
parent 8465bebd64
commit 1fa359967e
6 changed files with 11 additions and 5 deletions
@@ -0,0 +1,6 @@
cover:
template: default
icon: >
[[[
return entity.state === "open" ? "mdi:window-shutter-open" : "mdi:window-shutter";
]]]
@@ -156,7 +156,7 @@ cards:
name: "Kitchen" name: "Kitchen"
- type: custom:button-card - type: custom:button-card
template: [small, with_state_background] template: [small, with_state_background, cover]
entity: cover.living_room entity: cover.living_room
name: LR Cover name: LR Cover
tap_action: tap_action:
@@ -151,7 +151,7 @@ cards:
entity: climate.kitchen_radiator_mode entity: climate.kitchen_radiator_mode
name: "Kitchen" name: "Kitchen"
- type: custom:button-card - type: custom:button-card
template: [small, with_state_background] template: [small, with_state_background, cover]
entity: cover.living_room entity: cover.living_room
name: LR Cover name: LR Cover
tap_action: tap_action:
@@ -18,7 +18,7 @@ cards:
columns: 4 columns: 4
cards: cards:
- type: custom:button-card - type: custom:button-card
template: [small, with_state_background] template: [small, with_state_background, cover]
entity: cover.living_room entity: cover.living_room
name: LR Cover name: LR Cover
tap_action: tap_action:
@@ -137,7 +137,7 @@
- type: horizontal-stack - type: horizontal-stack
cards: cards:
- type: custom:button-card - type: custom:button-card
template: default template: [default, cover]
entity: cover.living_room entity: cover.living_room
name: Cover name: Cover
tap_action: tap_action:
@@ -225,7 +225,7 @@
- type: horizontal-stack - type: horizontal-stack
cards: cards:
- type: custom:button-card - type: custom:button-card
template: default template: [default, cover]
entity: cover.living_room entity: cover.living_room
name: LR Cover name: LR Cover
tap_action: tap_action: