-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Library appends to payload previous messages instead of sending just what is received. #32
Comments
This is done on purpose because home assistant requires all sensor values when it receives a message on a topic. In the case of:
The temperature and humidity sensor value would be null. |
You have different sensors defined in home assistant for temperature/ humidity and air pressure. You can define them with separate messages. I think the only advantage would have been battery. For now this is not that big issue but will be for cube, once you have two parameters (angle number on rotate). |
Separate messages don't solve the problem, this can only be solved by using separate topics. (e.g. Therefore I would prefer to set an attribute on the converter or the device to not cache this message. (e.g. |
Thank we can close this issue and raise one separate only for the cube when analog angles will be required to be sent with the action. |
The disableCache option has been added which disabled caching for certain converters. So in the future we can safely add the cube angles for the MFKZQ01LM |
Messages get merged on subsequent calls from same device. This is more of a problem for example on Xiaomi Cube where you can have rotate with two parameters (action and direction) vs normal actions where you have only one.
Update: I've noticed the action was moved to rotate_left/ rotate_right which makes more sense, but I do think that messages on MQTT should match what is received from device and not combine messages unless we always send all attributes.
Actual
Expected:
The text was updated successfully, but these errors were encountered: