hemantkamalakar / haconfigs

My Home-Assistant configuration files
60 stars 20 forks source link

Constant errors in log #6

Closed jacekpaszkowski closed 5 years ago

jacekpaszkowski commented 5 years ago

Hi,

i suppose that it happen when i haven synced sleep data with Google. Then every 30 seonds i get this king of error in HA logs:

2019-07-05 09:20:43 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.googlefit_jacek_sleep fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 220, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 377, 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 "/usr/src/homeassistant/homeassistant/util/init.py", line 224, in wrapper result = method(*args, *kwargs) File "/usr/src/homeassistant/homeassistant/util/init.py", line 224, in wrapper result = method(args, kwargs) File "/config/custom_components/google_fit/sensor.py", line 630, in update bed_time = datetime.fromtimestamp(round(min(starts) / 1000)) ValueError: min() arg is an empty sequence

hemantkamalakar commented 5 years ago

Regret the delay in reply. I have now updated the custom component with the fix.