eelcohn / home-assistant-rdw

RDW sensor module for Home Assistant
7 stars 2 forks source link

Prevent exception when RDW API is unavailable (503 service unavailable) #5

Closed eelcohn closed 4 years ago

eelcohn commented 4 years ago

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 450, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/rdw/sensor.py", line 129, in update self._state = datetime.strptime(self._data.expdate, '%Y%m%d') TypeError: strptime() argument 1 must be str, not None

eelcohn commented 4 years ago

Deprecated issue. Fixed in 2.9.x