This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- type: custom:button-card | |
entity: media_player.living_room_tv | |
icon: mdi:television | |
name: Television | |
tap_action: | |
action: fire-dom-event | |
browser_mod: | |
command: popup | |
hide_header: true | |
card: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- alias: Select Traffic light Effect | |
trigger: | |
platform: state | |
entity_id: input_select.traffic_light_effect | |
action: | |
service: mqtt.publish | |
data: | |
topic: "cmnd/SmartTrafficLight/switch" | |
payload_template: "{% if states.input_select.traffic_light_effect.state == 'Alle tændt' %} 1 {% elif states.input_select.traffic_light_effect.state == 'Omvendt alle tændt' %} 2 {% elif states.input_select.traffic_light_effect.state == 'Grøn' %} 3 {% elif states.input_select.traffic_light_effect.state == 'Gul' %} 4 {% elif states.input_select.traffic_light_effect.state == 'Rød' %} 5 {% elif states.input_select.traffic_light_effect.state == 'Alle loop' %} 6 {% elif states.input_select.traffic_light_effect.state == 'En loop' %} 7 {% elif states.input_select.traffic_light_effect.state == 'Almindelig trafiklys loop' %} 8 {% endif %}" |