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

Trackers 'not home' during HA restart show up as 'Unavailable' rather than 'away' #228

Open
dimatx opened this issue Jun 30, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@dimatx
Copy link

dimatx commented Jun 30, 2024

Is your feature request related to a problem? Please describe.
When I restart HA when the trash bins are already out, they do not show as away, but as 'unavailable'

Describe the solution you'd like
If there is no signal from the tracker for some time, I'd like it to show as 'away' (or at least have the option to do that)

Describe alternatives you've considered
Alternatively, I would treat 'Unavailable' as away in my automations.

Additional context
Screenshot 2024-06-30 171209
Screenshot 2024-06-30 171343

@agittins agittins self-assigned this Jul 3, 2024
@agittins agittins added the enhancement New feature or request label Jul 3, 2024
@agittins
Copy link
Owner

agittins commented Jul 3, 2024

Yeah, I think you're right.

Thus far Bermuda only creates an entity when it sees it appear in the cache of seen bluetooth advertisements, AND it matches the list of configured devices. This means a previously configured device won't be "created" on restart until we see a packet from it, so HA will treat the entity as unavailable (HA restores the entity on startup, but it remains unavailable until Bermuda "creates" it).

This will require a bit of an architectural change in how the startup works, so I'll need to think it through properly so I don't bork things up, but I'm on board for fixing this when I can make the time.

In the meantime, I'd suggest using tests along the lines of "entity state is home" and "entity state is not home" in your automations, rather than testing for "state is away".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants