REST Api - Post State

Hi folks,
I currently writing a plugin to connect QSC Q-SYS and HA.

I came to a weird issue.
When I post to : https://IP:8123/api/states/entity_id
‘state’:‘on’

I see in the front end the light turn on, but the light doesnt actualy turn on… and when HA refresh the state of this light, it goes back off ?

I have a good ack from HA with all the attributes i’ve Post…

How can I resolve this ?

Thank you.

The API you’re using is only making a change in the state machine. You’re not actually changing the device itself. You need to use the light (or switch, depending on the actual type of the entity) turn_on service via this API:

Call a service via HA REST API

And how can I change the brightness of this light ?

Same was as was being discussed in the Discord channel :wink:

See the light docs for all the options. The payload would still be:

{"entity_id": "light.something", "brightness_pct": 100 }```

Thanks again Tinkerer and Pnbruckner.

It’s not fast enough… something i reveice nill ack from HA and doesnt do the action… its seems very random.