I have HA installed in my RV and call homeassistant.set_location with GPS data to periodically update my location. Unfortunately there is no way to update my zone zone, so any time based automations execute at the incorrect time.
I’m currently using timezonefinder to determine the current timezone based on my gps location. I would like to either be able to call a service such as homeassistant.set_timezone or provide some sort of indicator to homeassistant.set_location instructing it to compute and set the timezone in addition to the location.
Running HA on a boat and also have this issue. Ideally I would love to be able to have HA automatically update timezone based on an optional parameter called alongside homeassistant.set_location - perhaps update_timezone: true ?
I’d also appreciate a way to save gpx-files over my movements.
The logged position is useful for tagging images taken with any type of camera - that doesn’t already have this built in. (What you need is the gpx file and a software utility to match up with the times recorded in the images).
I was looking into this and I wonder if you could hack this by either directly through home assistant or via a crontab modify the .storage/core.config JSON file to change the Timezone?
For those of you who don’t want to wait, I took a little time out of my evening and implemented a custom component that provides this functionality:
Once installed, it will provide the arvee.set_timezone service, which functions just like the homeassistant.set_location service. Note that Home Assistant’s UI makes some assumptions regarding timezones, e.g. America/New_York is what they call “Eastern Time”. So if you set it to something else that is also EST (e.g. America/Detroit) the 'Timezone" drop down in the settings page will be blank. I don’t know what, if any negative impact that will have on other things as I wrote this in less than an hour.
There is also another service provided arvee.set_geo_timezone which takes a latitude and longitude and automatically looks up the timezone based on that data (and configures Home assistant accordingly):
Adding my +1 to be able to update timezone… also, the set_location service doesn’t seem to allow for elevation, which might be helpful for solar forecast.
I installed this with HACS and I can’t find the 2 services. I called them in an automation using the example you provided. I’m running HAOS 2023.3.6. Any suggestions? Thanks.
I’ve given up on waiting for HA to be updated to added timezone updating support. I’ve been using the arvee integration for the past six months. Thanks @coogle