Skip to content
Snippets Groups Projects
Unverified Commit c57cc851 authored by Jan Bouwhuis's avatar Jan Bouwhuis Committed by GitHub
Browse files

Add note on overkiz measurement sensor fix (#105141)

parent 65d3f7e1
No related branches found
No related tags found
No related merge requests found
......@@ -484,6 +484,10 @@ class OverkizStateSensor(OverkizDescriptiveEntity, SensorEntity):
if (
state is None
or state.value is None
# It seems that in some cases we return `None` if state.value is falsy.
# This is probably incorrect and should be fixed in a follow up PR.
# To ensure measurement sensors do not get an `unknown` state on
# a falsy value (e.g. 0 or 0.0) we also check the state_class.
or self.state_class != SensorStateClass.MEASUREMENT
and not state.value
):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment