Area sensors showing 0 when sensors are unavailable #323
Closed
bmcclure
started this conversation in
Ideas / Feature Requests
Replies: 2 comments
-
Hey Ben, this is a great point. I also think that if all are unavailable then the aggregate must reflect that. It does skip unavailable sensors already tho. It does list them because that's the list of entities the aggregate observes and they may become available again so we don't burn any bridges. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Due the new way aggregates work on the latest update (unreleased, coming up next release), aggregate entities will correctly show up Unavailable if all sensors are unavailable |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Magic Areas to aggregate temperature and humidity sensors in each room to a single value. If all sensors in an area become unavailable for any reason, then the area sensors are showing a value of 0. I occasionally have issues with my Zigbee network and have to unplug or shut down the coordinator, and then suddenly my average sensors and related automations start using bad values (e.g. averaging 0 and 70 to 35).
This seems unexpected, as Unavailable and 0 have different meanings. I was able to account for this in my Jinja code by ignoring values of 0, but that feels like a workaround, and potentially could cause incorrect results in certain scenarios (e.g. outdoor temperature in winter if the real temperature might actually be 0). Additionally, some of my sensors are helpers in the UI that don't offer an option to filter out values of 0.
It seems to me like if all sensors under an area sensor are unavailable, the area sensor should also be unavailable. And (maybe it already does this) it should also ignore unavailable sensors in its area average, ideally only available sensor would be taken into account. It still lists the unavailable sensor in the Attributes of the area sensor currently, but maybe that is intentional. I don't have a specific case where there is an area with both available and unavailable sensors so I couldn't confirm how it currently would handle that scenario, but I figured it's worth bringing into this overall topic to ensure that the area values always make sense.
Beta Was this translation helpful? Give feedback.
All reactions