//RESTITUISCE STATO API
curl -X GET -H "x-ha-access: PASSWORD" -H "Content-type: application/json" https://NOME.duckdns.org:8123/api/
//ACCENDERE UNO SWITCH 1
curl -X POST -H "x-ha-access: PASSWORD" -H "Content-Type: application/json" -d '{"entity_id": "switch.DEVICEID"}' http://NOME.duckdns.org:8123/api/services/switch/turn_on
// ACCENDERE UNO SWITCH 2
curl -X POST -H "x-ha-access: PASSWORD" -H "Content-Type: application/json" -d "{\"entity_id\": \"switch.DEVICEID\"}" "https://NOE.duckdns.org:8123/api/services/switch/toggle"
// LEGGERE LO STATO DI UN DISPOSITIVO
curl -X GET -H "x-ha-access: PASSWORD" -H "Content-type: application/json" https://NOME.duckdns.org:8123/api/states/DEVICE_ID -d {"state"}
Comments