helto4real / custom_component_myfitnesspal

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

Update of sensor.myfitnesspal_tomas is taking over 10 seconds #1

Closed helto4real closed 3 years ago

helto4real commented 5 years ago

Underlying scraping API I use is taking a long time updating. Since it is syncronous it make this warning. I will investigate if there is a better way to code this.

bachoo786 commented 2 years ago

Hi there

How often is this component meant to update? After some change in the myfitnesspal app would I see the update right away on this component in HA?

Thanks.

helto4real commented 2 years ago

Hi there

How often is this component meant to update? After some change in the myfitnesspal app would I see the update right away on this component in HA?

Thanks.

It is using "pull" to refresh values at the default refresh intervall for sensors. That is currently 30s. It would not be wise to do it more often since it will be a bad way to use the service and could lead to banned accounts.

bachoo786 commented 2 years ago

Hi there How often is this component meant to update? After some change in the myfitnesspal app would I see the update right away on this component in HA? Thanks.

It is using "pull" to refresh values at the default refresh intervall for sensors. That is currently 30s. It would not be wise to do it more often since it will be a bad way to use the service and could lead to banned accounts.

Oh right I see. The trouble I am having is when I update myfitnesspal app I don't see the changes on HA. It will only update once and wont update again at all.