Skip to content

Commit

Permalink
Fix upnp raw sensor state formatting when None (#30444)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnbruckner authored and balloob committed Jan 10, 2020
1 parent 5d850c5 commit c7e300e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions homeassistant/components/upnp/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ def unique_id(self) -> str:
@property
def state(self) -> str:
"""Return the state of the device."""
if self._state is None:
return None

return format(self._state, "d")

@property
Expand Down

0 comments on commit c7e300e

Please sign in to comment.