https://github.com/cyberjunky/home-assistant-google_fit
:hearts: This component tracks your Google Fit activities.
https://github.com/cyberjunky/home-assistant-google_fit
custom-component google-fit hacs home-assistant homeassistant python
Last synced: 22 days ago
JSON representation
:hearts: This component tracks your Google Fit activities.
- Host: GitHub
- URL: https://github.com/cyberjunky/home-assistant-google_fit
- Owner: cyberjunky
- License: mit
- Created: 2019-12-19T12:28:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-22T10:37:34.000Z (over 1 year ago)
- Last Synced: 2024-02-14T21:20:48.633Z (about 1 year ago)
- Topics: custom-component, google-fit, hacs, home-assistant, homeassistant, python
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 99
- Watchers: 13
- Forks: 21
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/hacs/integration) [](https://www.python.org/) [](https://www.paypal.me/cyberjunkynl/)
# NOTE: deprecated!
This integration is not maintained for Years, I suggest looking at this one:
https://github.com/YorkshireIoT/ha-google-fit# Google Fit Sensor Component
Based on, with small fixes:
-
-
-Creates Google Fit sensors.
At the moment, the component provides following measurements:- steps
- distance
- time
- calories
- weight
- height
- sleep
- heartrateThe sensors are designed to be flexible and allow customization to add new Google Fit dimensions with minimal effort with relative knowledge of Python and the Fitness Rest API.
# Installation
## HACS - Recommended
- Have [HACS](https://hacs.xyz) installed, this will allow you to easily update.
- Add `https://github.com/cyberjunky/home-assistant-google_fit` as a [custom repository](https://hacs.xyz/docs/navigation/repository) with Type: Integration
- Click Install under "Google Fit" integration.
- Restart Home-Assistant.## Manual
- Copy directory `custom_components/google_fit` to your `/custom_components` directory.
- Configure.
- Restart Home-Assistant.## Example configuration.yaml
In order to add this component as is, add a new sensor:
```yaml
sensor:
- platform: google_fit
name: Google Fit
client_id: your_client_id
client_secret: your_client_secret
```## Client ID and Client Secret
In order to generate your `client_id` and `client_secret`, see the prerequisites for the Google Calendar component:
To make sensor work you have to enable the Fitness API in your project.
In oder to enable Fitness API open Google Cloud console:and enable API.
It is recommendable to store the `client_id` and `client_secret` as securely as possible. You can read about it on:
Example:
```yaml
- platform: google_fit
name: Bob
client_id: !secret google_fit_client_id
client_secret: !secret google_fit_client_secret
```## FAQ
If you have issues authenticating or setup try this workaround first:
Set your HA timezone to (GMT+00:00) GMT (no daylight saving) then restart HA. You'll get a notification to Authenticate. Once the Auth with Google is complete, you can change your timezone back and restart.
## Debugging
Add the relevant lines below to the `configuration.yaml`:
```yaml
logger:
default: info
logs:
custom_components.google_fit: debug
```