Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for static trackers in non home zones. #20

Closed
wants to merge 1 commit into from

Conversation

ruifung
Copy link

@ruifung ruifung commented Jun 24, 2020

This mimics the behavior of special handling for home zones for other zones.

My particular use case is using static trackers in other places outside of my home zone, the person functions treat any state from non gps trackers as "unknown", so this corrects for that.

@pnbruckner
Copy link
Owner

So let me see if I understand. There are device_tracker entities whose state is either not_home or the name of one of HA's zones? Interesting. I didn't know about those.

I'll have to think about your changes some more to make sure they are the best way to handle these. In the meantime, can you propose corresponding changes to README.md with another commit?

@ruifung
Copy link
Author

ruifung commented Jul 2, 2020

Yeah, if you set up zones in HA, the default GPS trackers would return the name of the zone if you're in it.
I'll take a look for the README.md this weekend when I have time to.

More accurately speaking, they could be home, not_home or a name of a HA zone.
Apparently when you report the state as (Zone Name) as a static tracker (not type GPS, something like "router"), the person integration decides that your state is "unknown". Hence the replication of the special "home" handling that turns it into a "gps" type.

Admittedly, none of the built-in static device_trackers (router, bluetooth, etc) will actually report a zone name, I'm using a node_red flow to translate their "home" reports to the actual zone their in.

@pnbruckner
Copy link
Owner

Yes, I know that GPS based trackers do this (i.e., home, not_home or the friendly name of a zone other than home.) But I didn't know there were non-GPS based trackers that did this, too. Which ones do? Or are you saying you're creating some tracker in the state machine via node-red that behaves this way? If the latter, then that's probably why the person integration doesn't handle it the way you want, because generally non-GPS based trackers don't work that way.

@ruifung
Copy link
Author

ruifung commented Jul 3, 2020

Yea, I'm using node red to call device_tracker.see to achieve that.

@pnbruckner
Copy link
Owner

Ok, I'll have to think about whether or not it makes sense to handle this very unique case. I assume you're good for now having modified your copy of the code.

@pnbruckner
Copy link
Owner

I'm closing this since the discussion is getting pretty old. Also, the composite can accept any entity with latitude & longitude attributes now. That might work for you.

@pnbruckner pnbruckner closed this May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants