mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Return None when value is not known in OpenHardwareMonitor (#101127)
* Return None when value is not known * Add to coverage
This commit is contained in:
parent
542ab2dd76
commit
6e3c704a33
@ -898,6 +898,7 @@ omit =
|
||||
homeassistant/components/opengarage/cover.py
|
||||
homeassistant/components/opengarage/entity.py
|
||||
homeassistant/components/opengarage/sensor.py
|
||||
homeassistant/components/openhardwaremonitor/sensor.py
|
||||
homeassistant/components/openhome/__init__.py
|
||||
homeassistant/components/openhome/const.py
|
||||
homeassistant/components/openhome/media_player.py
|
||||
|
@ -79,6 +79,8 @@ class OpenHardwareMonitorDevice(SensorEntity):
|
||||
@property
|
||||
def native_value(self):
|
||||
"""Return the state of the device."""
|
||||
if self.value == "-":
|
||||
return None
|
||||
return self.value
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user