#button card that can show states of something different?

1 messages · Page 1 of 1 (latest)

inland oyster
#

quick question: is there a card that can show the state of a different entity as opposed to the entity it is switching? purpose: toggle a switch by single tap, toggle an automation by holding. Display off, on or auto depending on the states of the entity and the automation. Entity is the pump for the central heating, the automation is switching if automatically depending on the thermostats. So I want a button that ca toggle the pump and the automation and show if it is auto, man on or man off.

tawny ivy
#

Any card with a tap action can toggle any other entity on click.

#

So you could set like a tile card to display what you want, and then setup the tap/hold actions to toggle some other entity.

unkempt elm
#

To piggy-back off karwosts message, change the card's behavior for the action to perform-action, the action to whatever service you want (such as automation.toggle) and then the appropriate target.
In this example, a button card toggles the living room lights, holding brings up the more-info (both defaults), but double-tapping toggles an automation. ```yaml
type: button
entity: light.living_room_lights
show_name: true
show_icon: true
double_tap_action:
action: perform-action
perform_action: automation.toggle
target:
entity_id: automation.download_latest_gif

inland oyster
# unkempt elm To piggy-back off **karwosts** message, change the card's behavior for the actio...

thanks to both of you. It is not really the toggling of another entity that is the problem, I have that set up. What I am talking about it the displaying of the state of another entity: the button I have toggles entity A on tap, toggles entity B on hold, fine. But it will only display the state of entity A. I want it to show "on"/"off" when entity A is on/off but only if entity B (an automation) is off. When entity B is on then I want it to show "auto". For example. might also be nice with three different colours. Does that make sense?

type: custom:bubble-card
card_type: button
button_type: switch
entity: switch.to_q_sy2_jwm_to_q_sy2_jwm_wi_fi_tasmota_smart_switch_1_63a_adjustable
icon: mdi:pump
tap_action:
action: toggle
show_state: true
double_tap_action:
action: more-info
hold_action:
action: perform-action
perform_action: script.heating_pump_automation_off
target: {}
name: pump
show_attribute: false
show_icon: true