I’m having issues with AppDaemon not “actually” updating the attributes of my lights.
I have Kasa RGB lights which I can control no problem from automations, scenes or UI. Changing the state ON/OFF works fine, but changing brightness changes the value before being reset to its previous value.
My code is a bit messy to share all of it, but these are the core parts:
“set_state” only changes the internal value in Home Asssistant and does not communicate with actual devices, so the state and attributes returns to what your light entity is reporting to Home Assistant. You can use “turn_on`” or “call_service” in Appdaemon to communicate with devices.
This corresponds to the “set state” (POST state) endpoint in HA’s API documented here
This endpoint sets the representation of a device within Home Assistant and will not communicate with the actual device. To communicate with the device, use the POST /api/services// endpoint
Let me jump in… What do I do if it is not a light?
In my case it is a alexa media player Device derived from an Amazon Echo Dot.
I also realized that “set_state” won’t change the volume or anything else.
I know there is an media_player service called “volume_set” but I am not able to figure out what it expects as parameters.
So is there a way to find out what a service needs and how that nested parameter are handed over?
And what if I do not want to manipulate volume… the entity has plenty of parameters. I am a bit surprised that set_state is just HA internal and cannot imagine a usecase.
I feel HA lacks docu here and 99% of the users never touch the layer