Hi
Im using an ezviz smart switch through EZVIZ Smart Plug integration. Works fine but when I try to control the switch with a REST API it moves back to original state after a few seconds.
So, using HA REST API to toggle a switch works but its not persistent.
Endpoint
https://myhadomain:8123/api/states/switch.sanitarna_cirkulacija
payload
{
"state": "on"
}
This is the get result
{
"entity_id": "switch.sanitarna_cirkulacija",
"state": "off",
"attributes": {
"last_run_success": true,
"last_pressed": "2025-01-22T07:40:49.145446+00:00",
"icon": "mdi:power-socket-de",
"friendly_name": "Sanitarna"
},
"last_changed": "2025-01-22T07:40:54.529408+00:00",
"last_reported": "2025-01-22T07:40:54.529408+00:00",
"last_updated": "2025-01-22T07:40:54.529408+00:00",
"context": {
"id": "01JJ6FA0C1SPRDMFN9FWH0ZXNE",
"parent_id": null,
"user_id": null
}
Am I missing some attribute? Im starting to suspect its a racing condition, integration being we based, maybe it doesnt update the cloud before HA pulls new state.
Switch works just fine from lovelace.