I build a custom UI via socket API. That control my HA with clear UI.
But i don’t know how to send a custom data to service.
{
“id”: 24,
“type”: “call_service”,
“domain”: “light”,
“service”: “turn_on”,
// Optional
“service_data”: {
“entity_id”: “light.kitchen”,
…
}
}
Please help me, my Eng is not good.
Edited:
Im sorry, that can not work. I cant validate custom data from service on HA.
Websocket API dont support script. That mean i create many custom service then call it from API ???