I’m creating my own dashboard and would love some help. I want this one card to show the status of one sensor (garage door binary open/close binary sensor), but when I click it, i want it to call a service on a different entity (the switch that controls the garage door). I think i just have a syntax issue but I can’t figure it out anywhere. Thanks! Here is my code:
- entity: binary_sensor.garage_door_house_status
name: Garage House
value: mdi:garage
color: white
map_state:
'on':
color: yellow
value: mdi:garage-open
unavailable:
color: black
action:
service: cover.open_cover
service_data:
entity: cover.garage_door_house
here is the error i get when i run it:
Failed to call service cover/open_cover. extra keys not allowed @ data[‘service_data’]
OK now it is clear as we have the type of card you use…
tap_action is not the appropriate way to do it (I just read the documenattion of the banner card).
you have to use:
action:
service:
The problem (as far as I understand the documentation) is that this service is applied on the entity defined in the card… but you have a binary_sensor (binary_sensor.garage_door_house_status)… so the command cover.open_cover will not work on a binary sensor… You have to replace the binary_sensor by the entity cover.garage_door_house. I understand that in this case the layout/behaviour of the card is different… but this should work