So I have a number of matrix keypad switches that I built some time ago and I have them set up to send HTTP requests to sonoff relay modules to turn things on or off. Dummy me did an update of all of my devices and now my switches won’t turn on the relays. Here is an example of some of the code that used to work but now doesn’t.
I read through that, but didn’t see a solution in that info. This is the YAML that I have for the dual Sonoff relay, all I nee to know is how to turn the light or fan on with either a POST or GET request,
So for anyone that stumbles on this, I found my working solution. Apparently with the recent changes to ESPHome, in order to do actual device control, ESPHome requires that to be done through a POST request. You can no longer do it through the simple GET request method that I was originally using. I found this info through a google search and this is what the AI posted. I have it as a screenshot because I couldn’t find a single URL with this information.
OK, slight correction. After installing the above cod, it did wor, however after looking at the loga on the Sonoff as I was pushing the buttons, I noticed it was saying that the JSON headers were incorrect and that the URL format of “/light/light/turn_on” was depreciated. It said to use the entity name instead which is ACTALLY, “/light/Light/turn_on”. Notice the capital L. So here is what is now working with no log errors.