mirror of
https://github.com/home-assistant/core.git
synced 2026-05-03 19:41:15 +02:00
Add empty string to list of invalid states (#72590)
Add null state to list of invalid states
This commit is contained in:
committed by
Paulus Schoutsen
parent
103f324c52
commit
6e06b6c9ed
@@ -350,7 +350,7 @@ class StatisticsSensor(SensorEntity):
|
||||
if new_state.state == STATE_UNAVAILABLE:
|
||||
self.attributes[STAT_SOURCE_VALUE_VALID] = None
|
||||
return
|
||||
if new_state.state in (STATE_UNKNOWN, None):
|
||||
if new_state.state in (STATE_UNKNOWN, None, ""):
|
||||
self.attributes[STAT_SOURCE_VALUE_VALID] = False
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user