my first post. I’m a beginner and want to have a custom button card which after pressing the button, switches my wallbox on and according to the status of a binary_sensor (a modus discrete input register) changes its color.
Pressing the button and switching the wallbox works fine. just the change of color according to the binary_sensor does not work.
Sorry, I missed the bigger issue… There is no such action as toggle for binary sensors. The general convention in HA is that sensor’s are not directly controlled by user input, for that we use input entities/Helpers like Input Booleans.
If the source integration has actions that allow the user to alter/update the sensor’s value, you need to use call-service with those actions, not toggle.
In any case, the state values for color will need to be based off of "on” and “off”.
Thank you. Toggling works well, because that is a button (button.zentrale_wllbox_freigabe_taster) defined in my RaspberryMatic. I don’t switch/write the binary_sensor directly.
I press the defined card and the wallbox switches fast and properly.