New Google Fit UI-based Integration [YorkshireIoT]

I’ve created another Google Fit Custom Integration. Why? There were lots of issues around authentication with the old YAML based integrations and I fancied learning a bit more about how integrations work in HA.

If you want to try it out you can find it here: YorkshireIoT/ha-google-fit

3 Likes

Hi, @Yorkshire_IoT.
The latest update v 0.3.0 introduces the ability to choose the state of sensors after a daily reset. But in the configuration window there is no description of this choice:
fit1

Can you add a description?

Can you try clear your browser cache? This is mentioned as being an issue on the HA docs and it shows fine for me:

School error - it works :grinning:

Hi,

I get this message after send my ID client and Secret client:

Error 400: redirect_uri_mismatch

Do you know why?

Thanks

Hi,

Can you double check the URL at this point is correct and accessible when you’re asked to redirect to your local HA?

If that doesn’t work, can you create an issue on the GitHub and we can try fix the issue there.

Thanks

Solved.

I made a mistake creating de OAuth credentials.

Thanks!

@Yorkshire_IoT Thanks for this integration. I was planning a Health dashboard and this addressed most of my data needs using this integration.

I’m having a hard time interpreting the sleep data though. Can you help me understand this better. I would expect to see gradual increases for the sleep sensors as I sleep but it actually spikes when I fall asleep and works it’s way down until I wake up. I also noticed that the start of sleep time doesn’t always match my Google Fit but I assume that’s because of sync from my watch > phone > Google Fit > Home Assistant integration?

Here’s my sleep data in HA through the integration from the last few days.

Here’s the Google Fit data for the same night of sleep.

Hi @kernel610,

If you look at the table of sensor in the README it says that the sleep sensors just give the amount of sleep in the last 24 hours. That means if you have a regular sleep interval but say, go to sleep a bit later one night you will see your sleep sensors decrease over the cumulative last 24 hours. This is a bit strange but I haven’t found a better way to display the data which will take into account irregular sleep patterns like those on shift work while still not losing any of the original data (i.e. if you take a nap).

Your assumption on the update delay is correct, there is a sync issue specifically from phone to Google Fit server.

Any more questions, please reach out on the discussions section of the repo (it tends to get more visibility and so can help more people with the same question) :smile: Thanks

1 Like