Git Product home page Git Product logo

home-assistant_person_location's People

Contributors

jackyaz avatar rodpayne avatar

Stargazers

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

Watchers

 avatar

home-assistant_person_location's Issues

Integration is only working with first entry in person_names ?

Hi there,

i used your addon integration for some time and was really happy with it.

Since some days (I think with one of the latest updates) only the first entry in person_names gets some sensors and is alive after reboot. The second is ignored and not generated ?

When i swap entries the other first gets evaluated ?

Maybe there is an error since the new updates ?

person_location:
  mapbox_api_key: !#secret_mapbox
  osm_api_key: !#secret_osm
  google_api_key: !#secret_google_api_key
  language: de
  region: EU
  follow_person_integration: true
  create_sensors: "direction, geocoded, altitude, meters_from_home"  
  person_names:
    - name: Wife
      devices:
        - person.susi
    - name: Husband
      devices: 
        - person.max

Greetings from Austria

Kilowatt

Orphaned and unremovable integration

i gave this a test drive, decided it wasn't what i was looking for and now i have it showing as an integration and it erros as not loaded all the time and i am unable to remove the integration. my only option is to leave it in the back ground and disable it. even if i remove it from teh HACS screen the integration screen still shows it as errored .

Unclear on what follow_person_integration does

I'm not sure what the follow_person_integration setting does. I track Person entities with this integration, which have a combination of static and GPS trackers attached

Should I enable follow_person_integration ?

Setup question ...

I'm still confused after setup (Home Assistant Core 2022.5.3). Installation with HACS went smooth and I found a bunch of sensors.<devicename>_geocoded_location entries afterwards. I assume, they were created by this integration, right?

I read "This custom integration will look at all device trackers that are for a particular person and combine them into a single person location sensor, sensor._location. "

First question: how does the integration determine a mapping from device to person? Is the source the same as going to Settings | People | and add devices under "Select the devices that belong to this person."?

I also noticed that I cannot change all config parameters in the GUI as described in the README. Going to Settings | Devices & Services and clicking on "Home Person Location" and "Configure" I can only change Hours Extended Away, Minutes Just Arrived and Minutes Just Left. All others like "Google Region" are no longer accessible.

Unable to start component: 'list' object has no attribute 'split'

After adding this component to HA from HACS and restarting my HA, I am not finding the option to add Person Location in the list of options to setup a new integration.

After bouncing over to my ssh session and editing the configuration.yaml file and restarting HA, the following error is encountered.

Error during setup of component person_location
4:08:32 AM – (ERROR) Person Location (custom integration)

Logger: homeassistant.setup
Source: custom_components/person_location/const.py:270
Integration: Person Location (documentation, issues)
First occurred: 4:08:32 AM (1 occurrences)
Last logged: 4:08:32 AM
Error during setup of component person_location
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 249, in _async_setup_component
    result = await task
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/person_location/__init__.py", line 41, in setup
    pli = PERSON_LOCATION_INTEGRATION(API_STATE_OBJECT, hass, config)
  File "/config/custom_components/person_location/const.py", line 270, in __init__
    for x in self.config[DOMAIN].get(CONF_CREATE_SENSORS, []).split(",")
AttributeError: 'list' object has no attribute 'split'

I thought maybe it was caused by including my device tracker from room-assistant for my galaxy watch and commented that line out and restarted HA. It had no affect. I then went and added the Google api key and restarted. Still no effect. Last of all I commented out the "person." devices and gave HA a restart. Still no success starting this integration with no change on the error message given.

person_location:
  google_api_key: ***redacted**
  person_names:
    - name: Hath
      devices:
        - device_tracker.haths_s21
#        - device_tracker.haths_galaxy_watch_tracker
#        - person.hathakhm
    - name: Kyra
      devices:
#        - person.kyra
        - device_tracker.kyra_s_s21_ultra

Waze Exception WRCError: Internal Error

I’m on 2022.6.4 and getting …

This error originated from a custom integration.

Logger: custom_components.person_location.reverse_geocode
Source: custom_components/person_location/reverse_geocode.py:837 
Integration: Person Location (documentation, issues) 
First occurred: 8 June 2022, 09:32:23 (68 occurrences) 
Last logged: 8 June 2022, 22:19:29

(sensor.aaa_location) Waze Exception WRCError: Internal Error
(sensor.bbb_location) Waze Exception WRCError: Internal Error
(sensor.ccc_location) Waze Exception WRCError: Internal Error

It may be related to home-assistant/core#22022 (comment) or home-assistant/core#22022 (comment).

Configured Waze region (US) is not valid

I keep seeing the below error in my logs, it's persisted across multiple versions of HA, the most recent being 2023.12.0

Do I need to amend configuration or is it safe to ignore?

Source: custom_components/person_location/const.py:264
Integration: Person Location ([documentation](https://github.com/rodpayne/home-assistant_person_location/blob/master/README.md#table-of-contents), [issues](https://github.com/rodpayne/home-assistant_person_location/issues))
First occurred: 11:56:26 (1 occurrences)
Last logged: 11:56:26

Configured Waze region (US) is not valid```

Image for entity?

Not an issue as such, but more of a question. Is there any way to associate an image with the created entity? I'm using the device_tracker platform option. I've tried the customisation via configuration.yaml which works for an entity created by another integration, but doesn't seem to be working for this one.

Error trying to use this with 2022.2.3

GUI flow fails to load via Integrations menu. When attempting manual configuration in yaml, check configuration throws the below error

Component error: person_location - cannot import name 'REGIONS' from 'homeassistant.components.waze_travel_time.sensor' (/usr/src/homeassistant/homeassistant/components/waze_travel_time/sensor.py)

No data for driving minutes

Driving minutes shows 0 on the sensor.redacted-name_location entity while other attributes are being correctly populated. I see the following log message:

Logger: custom_components.person_location.reverse_geocode
Source: custom_components/person_location/reverse_geocode.py:875
integration: Person Location ([documentation](https://github.com/rodpayne/home-assistant_person_location/blob/master/README.md#table-of-contents), [issues](https://github.com/rodpayne/home-assistant_person_location/issues))
First occurred: April 19, 2024 at 6:21:10 PM (39 occurrences)
Last logged: 12:32:33 PM

(sensor.redacted-name_location) Waze Exception AttributeError: 'WazeRouteCalculator' object has no attribute 'calc_route_info'

When manually calling person_location.reverse_geocode on the same entity, it also generates the following log error:

Logger: custom_components.person_location.reverse_geocode
Source: custom_components/person_location/reverse_geocode.py:898
integration: Person Location ([documentation](https://github.com/rodpayne/home-assistant_person_location/blob/master/README.md#table-of-contents), [issues](https://github.com/rodpayne/home-assistant_person_location/issues))
First occurred: 12:32:58 PM (2 occurrences)
Last logged: 12:39:00 PM

(person.redacted-name) Exception KeyError: 'geocode_count'

Feature Request: Configuration option for display name and state

The sensor.name_location entity currently has a display name of "Name is at Location", with a state of either: Home, Away, Just Arrived, or Just Left.

In my setup, I am using the provided location entities in a glance card and the display name is too long, and the specific zone where the person is located is not visible. I still prefer to use this integration's location entity however for the geocoded information visible when clicking on the entity, as well as the transitioning from home state status.

It would be great if this integration could add a configuration option for the sensor information to mimic a person entity (with the added benefit of Just Arrived and Just Left). Specifically, when this proposed setting is turned on, person_name is used as the entity display name and reported_state is used as the state value.

Configured create_sensors error after Home Assistant upgrade from 2023.11.3 to 2023.12.3

person_location
Version: 2023.12.09

2023-12-20 06:16:06.034 ERROR (SyncWorker_11) [custom_components.person_location.const] Configured create_sensors: bread_crumbs,driving_miles,driving_minutes,geocoded,miles_from_home is not valid

2023-12-20 06:16:06.035 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config name = Pam
2023-12-20 06:16:06.035 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = p
2023-12-20 06:16:06.035 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = e
2023-12-20 06:16:06.037 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = r
2023-12-20 06:16:06.037 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = s
2023-12-20 06:16:06.037 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = o
2023-12-20 06:16:06.037 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = n
2023-12-20 06:16:06.037 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = .
2023-12-20 06:16:06.037 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = p
2023-12-20 06:16:06.038 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = a
2023-12-20 06:16:06.038 DEBUG (SyncWorker_11) [custom_components.person_location.const] person_name_config device = m

Configuration variable type changed from str to <class 'homeassistant.util.yaml.objects.NodeStrClass'>

Camera & Google Maps Configuration

Hi Rod, thanks for all your hard work on this :)

I believe the below configuration is deprecated? Please can you let me know how to configure it now?

camera:

  • name: combined_location_google
    platform: person_location
    still_image_url: >-
    {%- set markers = '' -%}
    {%- set pri_entity = 'sensor.rod_location' -%}
    {%- set pri_pin = 'R' -%}
    {%- set pri_longitude = state_attr(pri_entity, 'longitude') |string -%}
    {%- set pri_latitude = state_attr(pri_entity, 'latitude') |string -%}
    {%- if (pri_longitude != None) and (pri_latitude != None) -%}
    {%- set markers = markers + '&markers=color:blue%7Csize:mid%7Clabel:' + pri_pin + '%7C' + pri_latitude + ',' + pri_longitude -%}
    {%- endif -%}
    {%- set sec_entity = 'sensor.pam_location' -%}
    {%- set sec_pin = 'P' -%}
    {%- set sec_longitude = state_attr(sec_entity, 'longitude') |string -%}
    {%- set sec_latitude = state_attr(sec_entity, 'latitude') |string -%}
    {%- if (sec_longitude != None) and (sec_latitude != None) -%}
    {%- set markers = markers + '&markers=color:green%7Csize:mid%7Clabel:' + sec_pin + '%7C' + sec_latitude + ',' + sec_longitude -%}
    {%- endif -%}
    {%- set home_longitude = state_attr('zone.home', 'longitude') -%}
    {%- set home_latitude = state_attr('zone.home', 'latitude') -%}
    {%- set zoom = 16 -%}
    https://maps.googleapis.com/maps/api/staticmap?size=400x400&maptype=roadmap&visible={{home_latitude}},{{home_longitude}}{{markers}}&key={{google_api_key}}

SOURCE_TYPE_GPS deprecated constant which will be removed in HA Core 2025.1.

2024-04-06 20:44:39.475 WARNING (ImportExecutor_0) [homeassistant.components.device_tracker.const] SOURCE_TYPE_GPS was used from person_location, this is a deprecated constant which will be removed in HA Core 2025.1. Use SourceType.GPS instead, please report it to the author of the 'person_location' custom integration.

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.