Closed hugosbnarciso closed 3 years ago
@hugosbnarciso thanks for reporting, this component is not updated for a while and I'm not sure if Google's API is still working. I have added the debugging rules to the README file, please try it and post the outcome (anonymized)
Hi, here is mine
2021-03-25 10:47:57 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'google_fit'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'google_fit'
2021-03-25 10:48:05 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform google_fit
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 317, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 509, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 530, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 295, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
attr.update(self.device_state_attributes or {})
File "/config/custom_components/google_fit/sensor.py", line 247, in device_state_attributes
return self._attributes
AttributeError: 'GoogleFitWeightSensor' object has no attribute '_attributes'
2021-03-25 10:48:07 ERROR (MainThread) [homeassistant.components.sensor] google_fit: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 465, in async_device_update
await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 285, in wrapper
result = method(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 285, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/google_fit/sensor.py", line 428, in update
heartrate_datasources = self._get_datasources('com.google.heart_rate.bpm')
File "/config/custom_components/google_fit/sensor.py", line 272, in _get_datasources
datasources_request = self._client.users().dataSources().list(
AttributeError: 'NoneType' object has no attribute 'users'
2021-03-25 10:48:10 ERROR (MainThread) [homeassistant.components.sensor] google_fit: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 465, in async_device_update
await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 285, in wrapper
result = method(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 285, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/google_fit/sensor.py", line 488, in update
for point in self._get_dataset(self.DATA_SOURCE)["point"]:
File "/config/custom_components/google_fit/sensor.py", line 282, in _get_dataset
return self._client.users().dataSources(). \
AttributeError: 'NoneType' object has no attribute 'users'
2021-03-25 10:48:14 ERROR (MainThread) [homeassistant.components.sensor] google_fit: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 465, in async_device_update
await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 285, in wrapper
result = method(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 285, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/google_fit/sensor.py", line 626, in update
sleep_dataset = self._client.users().sessions().list(userId='me',fields='session',startTime=starttime,endTime=endtime).execute()
AttributeError: 'NoneType' object has no attribute 'users'
I'll see if I can debug it myself and create a PR
Is this issue still there, did you manage to isolate the issue?
i did not and stopped used it :/
Bad to hear that, I will code the issue for now, can have a look when someone else run into it, I cannot reproduce it.
Hello,
This stopped updating. Can you tell me how to debug so i can send you the info?
thanks, H