After spending hours and hours trying to see why my automation were not triggering a condition (time) I finally find out that the problem relies on the HA Operating System. The time is wrong. 3 hours behind.
The interesting thing is that all these devices has the correct time zone :
- Windows 7 running Oracle Virtual Machine
- In the configuration yaml I have :
Otherwise for some odd reason my home will be Amsterdam.
The time zone seems to be correct “Americas/Vancouver” im in NY
but the time is -3.
How can I fix this ?
Im running my automation with -3 hours for now
Is that a typo?
Because if you live in New York then you’re on the east coast whereas
America/Vancouver is the timezone for the west coast. It implies the machine’s timezone was set incorrectly and should be
Configuration > Settings > General > Time Zone
Set your correct location and time zone …
Ok thanks, I changed it however still showing -3 hours
Here are the changes
Obviously I disguised the latitude\Longitude values
Look at the task bar on the right hand side.
and Yes I restarted HA.
Is the virtual machine’s clock set correctly?
Yes its. I even checked the BIOS and also the Verizon Router.
That is the right time in NY now, almost noon
I don’t use Oracle Virtual Machine but those screenshots look like the UI for setting the date and time of the host machine’s Windows operating system. Are you certain the VM you created, to host Home Assistant OS, has its clock set to the correct time zone?
I may be wrong, but it’s my understanding that a VM’s clock references the host machine’s clock but can be offset by a desired amount of time.
You are correct, that is a UI of my windows machine.
How do I check the vm clock.
But did you set it inside Home Assistant via the UI?
I did but here is the thing, if I want to location to be right I needed to edit the configuration.yaml file, if I dont then it will read Amsterdam. Right now the UI for the time zone is grayed out.
How do I change the home location from Amsterdam to where I live in NY
Here is what it looks like now. I removed the configuration.yaml lines for the time_zon, altitude etc
It’s now a bit confusing where you changed what. Home Assistant uses the settings in the General section or, if they exist, the ones in
configuration.yaml. If you remove the settings (for timezone, latitude, longitude, etc) from
configuration.yaml then it will use the ones in the UI. The ones you set in the UI are not written to
configuration.yaml (they’re stored elsewhere, in a hidden file).
Ok thats fine I was just letting you know what happened if I enter those line in the configuration yaml file but lets forget about that for now. Im in the UI, how do I change my HOME location.
Go to the terminal and type ‘date’ without the single quotes - it will show you the time and date. To set the time type ‘date +%T -s “hh:mm:ss”’ without the single quotes
Drag and drop the map pin to the desired location.
Ok i typed : date +%T -s 12:59:00
I get the new time however if I type date again it goes back to the -3 hours
It appears HA resets the time based on location. As @123 suggested, move the pin on the map to the desired location, save it and restart home assistant.
I moved the location to my location, the time zone is america/new_york, still showing -3 hours