Code Monkey home page Code Monkey logo

googlegeocode-hass's Introduction

Google Geocode

This component has been created to be used with Home Assistant.

Google geocode is the process of converting device tracker location into a human-readable address.

The sensor will update the address each time the device tracker location changes. If the device tracker is in a zone it will display the zone.

Installation:

Copy the manifest.json file and place it in <config_dir>/custom_components/google_geocode/manifest.json

Copy the sensor.py file and place it in <config_dir>/custom_components/google_geocode/sensor.py

Example Screenshot:

alt text

Example entry for configuration.yaml

sensor:

  - platform: google_geocode
    origin: device_tracker.mobile_phone

Configuration variables:

origin (Required): Tracking can be setup to track entity type device_tracker. The component updates it will use the latest location of that entity and update the sensor.

name (Optional): A name to display on the sensor. The default is “Google Geocode"

options (Optional): Select what level of address information you want. Choices are 'street_number', 'street', 'city', 'county', 'state', 'postal_code', 'country' or 'formatted_address'. You can use any combination of these options, separate each option with a comma. The default is “street, city"

display_zone (Optional): Choose to display a zone when in a zone. Choices are 'show' or 'hide'. The default is 'show'

gravatar (Optional): An email address for the device’s owner. You can set up a Gravatar here. If provided, it will override picture The default is 'none'

api_key (Optional): Your application’s API key (get one by following the instructions below). This key identifies your application for purposes of quota management. Most users will not need to use this unless multiple sensors are created.

You need to register for an API key to use Google Geocode. This can be done by following these instructions

  • Go to Google Maps Platform API
  • Click on 'Get Started'
  • Select 'Maps' and 'Places' then click 'continue'
  • Create a new project or select an existing one then click 'next'.
  • Clcik 'Create Billing Account'
  • Create a name for the account then click 'Continue'
  • Confirm your Country then click 'Confirm'
  • Fill in your detail the click 'Submit and enable billing'
  • To Emable your API's Click 'Next'
  • Copy your API key.

Example with optional entry for configuration.yaml

- platform: google_geocode
  name: michael
  origin: device_tracker.mobile_phone
  options: street_number, street, city
  display_zone: hide
  gravatar: [email protected]
  api_key: XXXX_XXXXX_XXXXX

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.