Giter Club home page Giter Club logo

home-assistant-google_fit's Introduction

hacs_badge made-with-python Donate

Google Fit Sensor Component

Based on, with small fixes:

Creates Google Fit sensors. At the moment, provides following measurements:

  • steps
  • distance
  • time
  • calories
  • weight
  • height
  • sleep
  • heartrate

Sensor is designed to be flexible and allow customization to add New Google Fit dimensions with minimal effort with relative knowledge of Python and Fitness Rest API.

Installation

HACS - Recommended

  • Have HACS installed, this will allow you to easily update.
  • Add https://github.com/cyberjunky/home-assistant-google_fit as a custom repository with Type: Integration
  • Click Install under "Google Fit" integration.
  • Restart Home-Assistant.

Manual

  • Copy directory custom_components/google_fit to your <config dir>/custom_components directory.
  • Configure.
  • Restart Home-Assistant.

Example configuration.yaml

In order to add this component as is, add a new sensor:

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 Google Calender component: https://www.home-assistant.io/components/calendar.google/#prerequisites To make sensor work you have to enable Fintness API in your project. In oder to enable Fitness API open Google cloud console: https://console.cloud.google.com/apis/library/fitness.googleapis.com and enable API.

It is recommendable to store client_id and client_secret as secret as possible. You can read about it on: https://www.home-assistant.io/docs/configuration/secrets/

Example:

  - platform: google_fit
    name: Bob
    client_id: !secret google_fit_client_id
    client_secret: !secret google_fit_client_secret

Debugging

Add the relevant lines below to the configuration.yaml:

logger:
  default: info
  logs:
    custom_components.google_fit: debug

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.