Hello everyone,
I’m trying to figure out how to modify the properties of a card, specifically the custom:button-card.
In particular, I would like to understand how, through a button that calls a service, to modify a property, for example “show_name”, in order to change its value from “true” to “false” and vice versa.
I’ve already done it inside the card itself but I’ve never done it externally through a service call or something similar.
Thank You very much in advance for any advice you would give.
You cannot call a service at the server side to directly access the frontend. What you can do is manipulate an entity state, and use that entity state in the frontend in a template (assuming the card supports that, which is the case for custom button card).
You could either use an input_text to set the text server side, or set an inut_boolean and use that to determine the text in the button card.