I have a new Xiaomi 11T Lite (Android phone) with next alarm set to let’s say tomorrow 8:00. Time zone on my phone is configured automatically and correctly set (GMT+2).
But the companions next alarm sensor reads 7:00. So what else can I check?
I think it might be something with HA storing all times in UTC.
I don’t think that’s the reason.
I also have a Samsung Galaxy S10e where the HA companion’s next alarm sensor is working correctly. So it might be a setting within the phone itself or the app.
Depending on the app you use for the alarm its possible that its sending incorrect values. In my experience stock apps from Samsung and Xiaomi are notorious for sending the invalid value or their calendar apps also set alarms in the API. If you notice this you’ll need to stop using those apps and switch to Google Clock or Sleep as Android as those apps are known to respect the API. You can use the package attribute of the sensor to determine the problem app if you see odd reporting.
It is indeed the stock clock app. I installed the clock app by Google and the sensor reads the next alarm correctly from there.
For me it reads wrong from Sleep as Android
did you confirm that with the package attribute? most likely some other app is setting an alarm and impacts the app from getting the correct alarm data.
I have the same issue. I have double checked my Home Assistant time zone settings, and they are correct (GMT+1)
My entity:
sensor.sony_xperia__next_alarm
state: 2025-01-21T05:50:00+00:00
device_class: timestamp
icon: mdi:alarm
friendly_name: Sony Xperia Next alarm
Local Time: Tue Jan 21 06:50:00 GMT+01:00 2025
Package: com.google.android.deskclock
Time in Milliseconds: 1737438600000
I noticed that my lights never turned on in the morning.
Found out it was because I have limited the automation to only turn on between 0600-0800, and when the time zone is wrong, the next alarm is to early.
Hi everyone,
I do use Google Clock (com.google.android.deskclock), but in the app it indeed shows the package to be com.xiaomi.calendar. (I’ve never used the built-in calendar app, I use Google Calendar.) Does anyone know a solution to that? I don’t know exactly how long has it been an issue, the next alarm automations have been working fine since not so long ago…
(There’s been an update a couple of weeks ago, that might have caused this to happen, my current OS version is Xiaomi HyperOS 2.0.201.0)
Thanks!
solution is to go in the xiaomi calendar app and clear out any event in there
The problem with this is that it synchronizes the events from google… I found no other events in it though, only the google calendars’. Thanks though!
then stop syncing it to google and try to disable the app? the only real fix is to remove the events from teh offending app. The allow list may not work well in some cases as all alarm events are linear and the app is only notified about the next scheduled alarm and there can only be one.