Open
Description
Describe the solution you'd like
I would like to track if my laptop is home or not for home assistant automations, because sometimes I leave my phone at home.
This could be done using
- the currently connected WiFi name.
But lnxlink does not support exposing adevice_tracker
afaik.
And there is also no way to create a helperdevice_tracker
in Hass itself afaik.
A device_tracker is needed to attach a location tracking entity to a person in homeassistant. - the current actual geolocation. For this a WiFi geolocation service such as geoclue2 could be used.
This service runs already under many environments (e.g. Gnome afaik) and in certain places delivers very accurate geolocation.
Using the preinstalled GTK Python librarygi
this is easy to fetchfrom gi.repository import Geoclue clue = Geoclue.Simple.new_sync('something',Geoclue.AccuracyLevel.NEIGHBORHOOD,None) location = clue.get_location() print(location.get_property('latitude'), location.get_property('longitude'))
Additional context
No response