Hi, I have the following card, the icon and content section works fine, but when I try to execute the call service (conditional based on the status of sensor) the system said that service doesn’t exist.
Please Help
ERROR:
Failed to call service {% if is_state(‘binary_sensor/doorbell_streaming_sensor’, ‘False’) %} 'camera. Unable to find service {% if is_state(‘binary_sensor.doorbell_streaming_sensor’, ‘false’) %} 'camera
You are certainly not the first nor last person who would like templates in actions. I would suggest posting a desire to such for the author of this. I have resorted to using custom:state-switch for many things mushroom because of this. My old code using custom:button-card to now use custom:mushroom-template has “mushroomed” to 3x the size it use to be and it is nearly unmanagable. I will likely remove all mushroom setup because of this and a few other “non-templatable” fields. IMHO custom:button is far superior with the ability to build and reuse chunks of YAML within many other parts (instead of repeating them over and over).
@jalejandro0211 ,
Did you ever figure out a way to work this? I’m running into a similar issue. I started another thread, but I’m not making much headway.
Mike’s response would seem to indicate what I’m trying to do isn’t possible. My issue stems from the fact that there is a new device class for window coverings, and Home Assistant hasn’t fully caught up with this device class.
Yes. Most of my dashboards use decluttering where you can pass in variables.
Good example starts here:
So that one decluttering template displays stats for the NFL standings by Division (8 cards), by Conference (2 cards) and Overall (1 card).
Now if the card in question did have tap-action, etc. you could pass in variables to execute the action. LIke this template which can call a service with the “mediaplayer” passed in as a variable:
Now of course how does this help you? Well you can templatize the construction. In the above case, this uses auto-entities to build a whole set of cards that are my media zones: