mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add note on overkiz measurement sensor fix (#105141)
This commit is contained in:
parent
65d3f7e1c7
commit
c57cc85174
@ -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
|
||||
):
|
||||
|
Loading…
x
Reference in New Issue
Block a user