This is my very first post on this community. I really like Home Assistant and see alot of potential in this software.
My knowledge now is that i’m avaible of switching things over mqtt. Also reading temperature over MQTT is no problem.
My question is how does it work with RESTful Switches?
A year ago i bought a switch from www.smart-me.com. They have also a API https://smart-me.com/swagger/ui/index. They call it smart-me REST API. Actually i think it’s well documented there when someone has the right know how.
I was also able to switch the Smart-me switch with https://smart-me.com:443/api/Devices/XXX?switchState=true&switchNumber=1. XXX is for the ID of the Product
How can i implement in the configuration.yaml a switch or sensor?
Over the API Website i’m able to switch the relais. https://smart-me.com:443/api/Actions
I know this webpage contains something to login with HTTP auth basic. Of course i have a username and a password for it.
This is the code to switch the device. I just need to change the value from 0 to 1.
It’s not that no one is able to help you. It’s that there is a component in HASS that handles this already and it’s well documented and easily Googled (“RESTful Switch Home Assistant”).
Google is your friend. That page (literally the first result) tells you exactly what you need to configure it.
If for some reason you try to set it up and fail, then, in a new topic, if you post your configuration and the issue you’re having, you open yourself up to being helped. As this is worded, you’re not asking for help, you want someone to do it for you.