Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add service to push data to Google Fit #108

Open
3 tasks done
HydrelioxGitHub opened this issue Sep 27, 2023 · 2 comments
Open
3 tasks done

Add service to push data to Google Fit #108

HydrelioxGitHub opened this issue Sep 27, 2023 · 2 comments
Labels
enhancement New feature or request python Pull requests that update Python code
Milestone

Comments

@HydrelioxGitHub
Copy link

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

I would like to call some services to update some data from Home Assistant to Google Fit.

For example get weight for a MiScale and push it to Google Fit.

Or use my bed sensor to provide sleep information in Google Fit

Describe alternatives you've considered

I don't think there is other options.

Additional context

I've not tested this custom integration as only read sensors from Google Fit is not my current need. So maybe I've made a mistake with this feature request.

@YorkshireIoT
Copy link
Owner

Hi @HydrelioxGitHub,

Right now (and I can't see this changing anytime soon) this integration is just focused on reading data from Google Fit.

Writing data in the way you've asked for has a number of challenges:

Data needs to be pushed to Google Fit in an exact format.

  • Using your example of Mi Scales, it's very unlikely the data from Mi is in the exact format required to push to Google so some conversion would be required.
  • So for each data source we would need to do some sort of conversion for every provider.
  • This is well beyond the scope of this integration.

The only feasible way I can see this happening is if some barebones services were provided and it is up to the user to format the data in the correct way

Update existing scopes

Currently all permission scopes are read-only, and updating them to read/write would be a breaking change that would require all users to re-authenticate the integration. Where possible I try to avoid these (with the exception of adding new sensors).

This could be mitigated by adding a configuration option where a user needs to opt-in to enable write permissions for services.

Code Churn + Testing

Adding this would lead to a lot of reworking the existing code base. Everything seems pretty stable now without any major issues and I wouldn't want to break this functionality. So before this could ever be done I would want some decent testing in place so I could be confident things weren't going to break before releasing it.

Amount of effort

Finally, this sort of change would require a fair amount of time and effort which I don't have right now.

TLDR

There is no definite reason why this couldn't be done in some minimal way but right now it's not a priority. If enough people are clamouring for it, then this can be revisited.

@YorkshireIoT YorkshireIoT added enhancement New feature or request python Pull requests that update Python code labels Oct 22, 2023
@YorkshireIoT YorkshireIoT added this to the backlog milestone Oct 22, 2023
@lunarok
Copy link
Contributor

lunarok commented Feb 9, 2024

Would like this feature. Not sure I can help for the "core" way to implement it. But if it happens to be done and like for sensor there is a way to help with PR to extend with extra data to send, I will help. ie, when there is for exemple "push weight", I can help to extend with "push activity, push xxx"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

3 participants