Fix tap actions

This commit is contained in:
2020-04-20 19:25:38 +03:00
parent dc8c1fcea4
commit bd0b7aa344
2 changed files with 24 additions and 12 deletions
+22 -8
View File
@@ -78,6 +78,28 @@ views:
- type: custom:button-card - type: custom:button-card
template: small template: small
entity: media_player.nvidia_shield entity: media_player.nvidia_shield
tap_action:
action: call-service
service: media_player.toggle
service_data:
entity_id: media_player.nvidia_shield
state:
- value: 'playing'
styles:
card:
- background-color: var(--primary-color)
- color: black
icon:
- color: black
- value: 'standby'
styles:
card:
- background-color: var(--primary-color)
- color: black
icon:
- color: black
- type: custom:button-card - type: custom:button-card
template: small template: small
entity: media_player.living_room_tv entity: media_player.living_room_tv
@@ -221,8 +243,6 @@ views:
entity: script.music_play entity: script.music_play
name: Chill name: Chill
icon: mdi:music icon: mdi:music
tap_action:
action: toggle
- type: custom:button-card - type: custom:button-card
template: small template: small
entity: script.music_play entity: script.music_play
@@ -237,8 +257,6 @@ views:
template: small template: small
entity: script.tv_fireplace entity: script.tv_fireplace
name: Fireplace name: Fireplace
tap_action:
action: toggle
- type: horizontal-stack - type: horizontal-stack
cards: cards:
@@ -247,15 +265,11 @@ views:
entity: script.sonos_join_bedroom entity: script.sonos_join_bedroom
name: Sonos from Bedroom name: Sonos from Bedroom
icon: mdi:speaker-multiple icon: mdi:speaker-multiple
tap_action:
action: toggle
- type: custom:button-card - type: custom:button-card
template: small template: small
entity: script.sonos_join_tv entity: script.sonos_join_tv
icon: mdi:speaker-multiple icon: mdi:speaker-multiple
name: Sonos from TV name: Sonos from TV
tap_action:
action: toggle
- type: custom:decluttering-card - type: custom:decluttering-card
template: sonos_media_player template: sonos_media_player
@@ -2,8 +2,6 @@ small:
size: 30px size: 30px
hold_action: hold_action:
action: more-info action: more-info
double_tap_action:
action: more-info
styles: styles:
card: card:
- height: 100px - height: 100px