Hi All,
I have my own home automation made on Arduino modules and computer with C# application.
In my home automation I don’t have an extensive UI, so I wanted to use Home Assistant as the UI.
At first I wanted to create a switch that would control one of the lights. Based on the video Use the REST Component to Add A Shelly Switch To Home Assistant
I created a server that accepts the command http://192.168.1.11:9000/Light?turn=on. Using the web browser or Postman everything works fine in my app - the light goes on and off. Unfortunately, I have a problem with the configuration on the HA side.
Entity names are always lowercase, and will be converted that way from the name, so try “switch.test_lamp1” (check that’s what it is in Dev Tools). Note sure if that’s the issue though - maybe have a look in the logs.
However, the UI can now change a switch to a light - under “Settings > Devices & Services > Helpers > Create Helper > Change device type of a switch”. Therefore you wouldn’t need this definition in config.
It does not help me.
In my C# application (server) now I responds for request http://192.168.1.11:9000/Light. My response for this request contain json node
{
"ison": true
}
Now my switch is active and show correct state of light.