Hi,
I Have on My Dashbard the Costum Button:
I Would like that the Name will Come into the Middle and on the Right Side i want that it shows the State like “ON” or “OFF”. And when i tap it, i want, that the switch goes in ON or OFF.
The Code from the Button:
- name: Trocknen
template: button_routine_home
icon: 'phu:button'
tap_action:
action: switch
service: switch.aktor_trockner_state
type: 'custom:button-card'
And the template is:
button_routine_home:
template:
- button_horizontal
- feedback_click
size: 50%
styles:
grid:
- grid-template-columns: 30% 1fr
name:
- color: var(--secondary-text-color)
icon:
- color: var(--secondary-text-color)
tap_action:
action: switch
service: '[[[ return entity.entity_id ]]]'
Can someone Help me?
Big thanks!