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
2 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue