Set your Home Assistant system timezone dynamically using either:
- A direct IANA timezone string (e.g.,
America/New_York
) - Or geographic coordinates (
latitude
andlongitude
) via timezonefinderL: a fast and lightweight python package for looking up the corresponding timezone for given coordinates on earth entirely offline!
This integration is useful for mobile installations (like vans, RVs or boats), or automations that require adjusting the system timezone based on location. Best of all, it does not require an internet connection.
This integration is not yet available in the HACS default store, however you can still install it via HACS as a custom repository:
- In Home Assistant, go to HACS → Integrations
- Click the ⋮ (three-dot menu) in the top right
- Choose "Custom repositories"
- In the dialog:
- Repository:
https://github.com/SmartyVan/hass-timezone-setter
- Category:
Integration
- Repository:
- Click Add
The integration will then appear in your HACS Integrations list and can be installed and updated like any other.
-
Copy this repository to your Home Assistant config folder:
custom_components/timezone_setter/
-
Restart Home Assistant.
-
The integration will register a service:
timezone_setter.set_timezone
Call the timezone_setter.set_timezone
service via the Developer Tools, automations, or scripts.
- A timezone string (preferred if known), or
- A latitude + longitude pair, from which the integration will detect the proper timezone
service: timezone_setter.set_timezone
data:
timezone: "America/Chicago"
Or:
service: timezone_setter.set_timezone
data:
latitude: 40.7128
longitude: -74.0060
If both are provided, timezone
takes priority and coordinates will be ignored.
- Uses
timezonefinderL
for fast and lightweight timezone lookup without an internet connection. - Service requires admin permissions.
- Only updates the system timezone (does not affect individual users or devices).
MIT License
Created by @SmartyVan