I currently have two separate entities. One shows the current state of an automation (on/off) including state_color
. The second runs a script which disables that automation and toggles a light.
I would like to combine those into a single entity row which:
- Shows the current state of the automation via
state_color
- Runs the script to disable the automation when tapped
- Ideally: Allows for custom text (in this case “Snooze”) on the right side.
I have been able to accomplish these things separately but not together in a single entity, maybe it’s not possible.
Here is an example. The first two under the “Attempts” section give all the aspects I’m looking for but the state_color does not work. The section below that includes the items being effected so I can see their state during the testing.
type: entities
entities:
- type: section
label: Attempts
- entity: script.snooze_alerts
name: Alerts
icon: mdi:alarm-light
action_name: snooze
tap_action:
action: call-service
service: script.snooze_alerts
- type: button
entity: automation.notify_alerts
name: Alerts
icon: mdi:alarm-light
action_name: snooze
tap_action:
action: call-service
service: script.snooze_alerts
- type: section
label: Automation / Entities
- entity: automation.notify_alerts
icon: mdi:alarm-light
name: Alerts
- entity: light.basement_lamp_bulb
show_header_toggle: false
state_color: true
Here you can see than the automation entity in the lower section shows the state_color
like I want, but the attempts at combining them do not, though they do have the other aspects I’m looking for (say “snooze” and run the script).
Here is a mockup of the final result I want.
I can get the desired results with a full blown button card but that does not fit into the dashboard I’m trying to build, unless there’s a way to make it really compact, like the size of an entity row.
type: button
tap_action:
action: call-service
service: script.snooze_alerts
entity: automation.notify_alerts
icon: mdi:alarm-light
name: Snooze Alerts