Hello, everybody.
I used Appdaemon and very happy with it.
Now I running HA 0.87.1 on hass.io.
I got a issue with Aqara cube.
After callback registering with:
the listen_state picks up 2 state changes from the sensor.
that can be the state itself or 1 of the attributes from the sensor.
so you need to log new and attribute to see what changes and only listen for that.
thats what you get from home assistant.
but there is always less then a second in between, so you can tell the app only to listen if the last state change was more then 1 second ago.
does the sensor have attributes in HA?
something else then state must change to get a listen_state with old and new the same
what attributes are there?
they might change for a few microseconds and then change back.
which would explain it, but i cant help you trying to find that out, without knowing which attributes there are.
i am sorry i dont know how you did setup the sensor in home assistant and i have no experience with the cube.
all i can do is try to help you to come to a result you want.
and for that i need all information you can give me about the sensor.
appdaemon listens to statechanges in home assistant.
when you dont specify attributes in the listen_state it listens to all attribute state changes.
so thats the most common problem. (could be for instance that the attribute last_changed, changes even thought the state doesnt change)
i know that in case from the cube most people use listen_event, because you can shake, after shake, after shake, and that needs to be registered.
so you dont want only a statechange from shake to tap(or slide) to be registered.
If you thinks this is not bug, I will provide you all required information.
List of attributes changes depends of action. For shake are battery, voltage, linkquality and action. For rotate angle is additional atribute. And so on.