Following this Blog and ESPHome tutorial I’m able to read entities value
folowing this suggestions
and pass values from Custom component reading sensors through this tutorial
Now I have some toggles (input.boolean) in my dash board.
How to read the state value “on / off” and
how to set in “switched-on” and “switched-off” from my C code?
I tried
Thanks @nickrout : Ok: “binary sensor” instead of sensor, but even if the state true/false is associated to “state” the toggle icon in the dash board deons’t change. That actually my true issue. How to manage it?
I would start with log on ESP Home dashboard. When you make a state change in HA does it show in the live log as being imported to the Binary Sensor? I am just setting mine up. I can see it in my logs instantly when I trigger a HA switch. I am now about to start on my automation
However the visual toggle on dash board doesn’t change. The toggling demo period is 1s.
So it is not a problem of delay responsivity
Maybe publish_state is not enough to change the visual state?