Skip to content

Commit

Permalink
fix sensor startup
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Perschon <[email protected]>
  • Loading branch information
tofuSCHNITZEL committed Oct 8, 2022
1 parent 6edcab5 commit ff40afd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/wienerlinien/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ def name(self):
@property
def state(self):
"""Return state."""
return f"{self._state[:-2]}:{self._state[26:]}"
if self._state is None:
return self._state
else:
return f"{self._state[:-2]}:{self._state[26:]}"

@property
def icon(self):
Expand Down

0 comments on commit ff40afd

Please sign in to comment.