Stavros
(Stavros McGillicuddy)
July 5, 2020, 5:30pm
1
How can I add…
This button card calling a script
entity: automation.garage_door_remote
icon: 'mdi:garage'
name: Garage Door Remote
tap_action:
action: call-service
service: script.garage_door_remote
type: button
to this Glance card?
entities:
- entity: binary_sensor.garage_door_sensor_open_close
icon: 'mdi:garage'
- entity: sensor.garage_door_temperature
- entity: sensor.garage_door_battery
title: Garage
type: glance
Recte
July 6, 2020, 12:03pm
2
How about “using” the tab_action of the button
type: glance
entities:
- entity: script.1594036865145
tap_action:
action: toggle
The code above is what the button generates. It works with a script that toggles the light. So I guess you can toggle your script or use the action like set at the button.
Recte
July 7, 2020, 9:28am
3
For the record, with the code above, I meant the tab_action code . And I tested it by switch a bulb off and on trough a script (of course).
Stavros
(Stavros McGillicuddy)
July 8, 2020, 1:08am
4
Here is my latest glance card.
To simplify, I want to turn the lights on or off. Nothing fancy
The helper text is giving me this…
Expected a value of type’{entity,name,icon | entity-id’ for ‘entities.o.tab_action’ but received '{“action”:“toggle”}
type: glance
title: Office
entities:
- entity: switch.office_on_off
icon: 'mdi:lightbulb'
name: Desk
tab_action:
action: toggle
- entity: light.office_accent_on_off
icon: 'mdi:lightbulb'
name: Accent
tab_action:
action: toggle
Stavros
(Stavros McGillicuddy)
July 8, 2020, 3:30am
5
I dont know why but, this works
entities:
- entity: switch.office_on_off
icon: 'mdi:lightbulb'
tap_action:
action: toggle
type: glance
show_state: true
title: Office
I know this is old thread but it helped me. Here is my glance card if someone is looking for simple.
Here is the card yaml
show_name: true
show_icon: true
show_state: true
type: glance
entities:
- entity: cover.garage_door
- entity: script.open_garage_door
name: Open
show_state: false
tap_action:
action: toggle
- entity: script.close_garage_door
name: Close
show_state: false
tap_action:
action: toggle
1 Like