helto4real / custom_component_myfitnesspal

Custom component in Home Assistant for getting fitness datat from MyFitnessPal
MIT License
13 stars 13 forks source link

my_fitnesspal: Error on device update! #4

Closed Zar1416 closed 3 years ago

Zar1416 commented 4 years ago

Log Details (ERROR) Logger: homeassistant.components.sensor Source: custom_components/my_fitnesspal/sensor.py:177 Integration: Sensor (documentation, issues) First occurred: 8:59:05 AM (2 occurrences) Last logged: 8:59:11 AM

my_fitnesspal: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 324, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update await self.async_update() File "/config/custom_components/my_fitnesspal/sensor.py", line 143, in async_update self.update_data_sync 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/my_fitnesspal/sensor.py", line 177, in update_datasync , weight = list(weights.items())[0] if len(weights) > 0 else 0 TypeError: cannot unpack non-iterable int object

Zar1416 commented 4 years ago

I'm running Home Assistant Core 0.108.3

helto4real commented 4 years ago

Hi thank you for reporting. I have now updated the package I am using for myfitnespal and fixed new version. Please upgrade and try if that fixes the problem?

Zar1416 commented 4 years ago

no sorry . the problem is the same

helto4real commented 4 years ago

Ok are you sure the user name and password is still valdid. Please try to login with exact same as you use in home assistant. Also it seems that it fails on weight. Do you have a record in MFP?

lukasrininsland commented 4 years ago

Hi, I have the same problem since the last update. I can login with my username and password on myfitnesspal.com but not in home assistant. If i use an incorrect password in home assistant there is an error, so i think the username and password i use will be recognized but there are no entities.

helto4real commented 3 years ago

Try newest version. Reopen if still problem