Code Monkey home page Code Monkey logo

googlegeocode-hass's Introduction

Google Geocode

hacs_badge

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.

Credit

Full credit for this component lies with michaelmcarthur.

Installation:

HACS

  • Ensure that HACS is installed.
  • Search for and install the "Google Geocode HASS" integration.
  • Restart Home Assistant.

Manual installation

  • Download the latest release.
  • Unpack the release and copy the custom_components/google_geocode directory into the custom_components directory of your Home Assistant installation.
  • Restart Home Assistant.

Example Screenshot:

alt text

Example entry for configuration.yaml

sensor:

  - platform: google_geocode
    origin: device_tracker.mobile_phone

Configuration variables:

Name Required/Optional Description
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'
image Optional A link to an image which if provided, 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.
language Optional The language with which you want to display the results from Google Maps
region Optional The region with which you want to display the results from Google Maps
scan_interval Optional The frequency with which scans occur in seconds, the default is 60.

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'.
  • Click '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
  language: en-GB
  region: GB

googlegeocode-hass's People

Contributors

astiskala avatar ehendrix23 avatar gregoryduckworth avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

googlegeocode-hass's Issues

Options are not changeable.

options: street_number, street, city

13, MunichRoad, Munich

example:

options: street, street_number, city

MunichRoad, 13, Munich

If you change the order, it doesnt change the order.

The ability to stop/start the service polling based on a HA sensor

First - I'd like to thank you for your work on this - it is invaluable and I love it!

Is your feature request related to a problem? Please describe.
Sometimes I would like to stop polling based on a HA sensor state. For example, if the family is on vacation - we are all together and I know where everyone is, so Id like to stop the polling service to reduce Google Maps costs.

Describe the solution you'd like
I'd love to see the option to stop the service based on a HA sensor. I have set up an input_boolean.vacation_mode and a switch that changes its state to on/off accordingly. So I'd be happy to be able to stop polling if the vacation_mode is on and resume polling if it is off

Describe alternatives you've considered
The only alternative I can think of is manually disabling the google_geocode configuration. Having it respond to state will be automatic, which is better :)

Thanks again for a great extension!
Sefi

Unable to install via HACS

Hi there, I am attempting to install this add-on via HACS, I have installed the repo from HACS but the integration doesn't actually appear in the list of integrations to add when I search Google, I've tried updating everything, reinstalling, clearing cache, no dice
Thanks

Running Home assistant supervised on Ubuntu 20.04 server

Please add version key to manifest file so this will keep working with Home Assistant

Describe the bug
Missing version key

To Reproduce
No 'version' key in the manifest file for custom integration 'google_geocode'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'google_geocode'
No 'version' key in the manifest file for custom integration 'satellitetracker'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'satellitetracker'

Expected behavior
Not to see an error message in my logs regarding this issue.

Screenshots
If applicable, add screenshots to help explain your problem.

Home Assistant Version (please complete the following information):

  • OS: Docker
  • Version 2021.4.0

Need to implement device_state_attributes

Source: helpers/entity.py:549
First occurred: January 3, 2022, 11:40:27 PM (1 occurrences)
Last logged: January 3, 2022, 11:40:27 PM

Entity sensor.xxx_ariela_current_location (<class 'custom_components.google_geocode.sensor.GoogleGeocode'>) implements device_state_attributes. Please report it to the custom component author.

Integration stopped working after upgrade to Home Assistant 0.112.1

Describe the bug
The integration worked flawlessly until the upgrade to Home Assistant 0.112.1

To Reproduce
Steps to reproduce the behavior:

  1. upgrade to Home Assistant 0.112.1
  2. wait for poll interval to elapse
  3. location is not reported, Google Maps API dashboard shows no API requests

Expected behavior
Integration should work as before the upgrade

Home Assistant Version (please complete the following information):

  • OS: Docker
  • Version Home Assistant 0.112.1

Question/FR: Quick and Dirty Translation

Currently the sensor returns "Home" if at home and not the name of the Home.

What can I change / or can be changed to use the name of the home instead as state?

I tried to set it hard here

        if self.hass.states.get(self._origin_entity_id) is not None:
            zone_check = self.hass.states.get(self._origin_entity_id).state
        else: 
            zone_check = 'not_home'

        # Do not update location if zone is still the same and defined (not not_home)
        if zone_check == self._zone_check_current and zone_check != 'not_home':
->            if zone_check == 'home':
->                self._state = 'Zu Hause'
            return

        self._zone_check_current = zone_check

because I thought this is the place I can tweak it, but I can't.

Any ideas or advice or plans to take the home name instead of "Home"?

Multiple users

Hi!
If i want do add multiple users do i need to make a API account for every user? or is it possible to do like this?

   - platform: google_geocode
     name: 0
     origin: device_tracker.0phone
     options: street_number, street, city
     display_zone: hide
     gravatar: my email
     api_key: my API
   - platform: google_geocode
     name: 1
     origin: device_tracker.1iphone
     options: street_number, street, city
     display_zone: hide
     gravatar: my email

   - platform: google_geocode
     name: 2
     origin: device_tracker.2iphone
     options: street_number, street, city
     display_zone: hide
     gravatar: my email

   - platform: google_geocode
     name: 3
     origin: device_tracker.3iphone
     options: street_number, street, city
     display_zone: hide
     gravatar:my email

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.