Fix upnp raw sensor state formatting when None (#30444)

This commit is contained in:
Phil Bruckner authored and Martin Hjelmare committed 2020-01-09 06:51:30 +01:00
1 parent fe0b537291
commit 260596d11b
1 file changed
+3
+3
View File
@@ -126,6 +126,9 @@ class RawUPnPIGDSensor(UpnpSensor):
@property
def state(self) -> str:
"""Return the state of the device."""
if self._state is None:
return None
return format(self._state, "d")
@property