I have a button which fires a scene. When the scene fires an automation also gets triggered that toggles an input_boolean to ON. This also updates the button's looks so that it shows the scene is "active".
I have another scene with everything off and would like it to fire when the button is tapped during its "ON" state (aka when the input_boolean is on). Could I go about this with a switch of some sorts?
Here's my current code:
tap_action:
action: call-service
service: scene.turn_on
service_data:
entity_id: scene.shower
icon: mdi:shower-head
show_name: false
styles:
card:
[irrelevant styling here]
- background-color: >
[[[
return states['input_boolean.scene_shower_activity'].state == 'on' ? '#6cd7ff' : '#366d74';
]]]
icon:
- color: >
[[[
return states['input_boolean.scene_shower_activity'].state == 'on' ? 'black' : '#25364f';
]]]
show_name: false```
Many thanks