Detailed description of the problem:
Sleep as Android is updating the system alarm clock every minute.
The internal alarmclock used by Android (the one you can also set via the normal clock app), seems to be updated 1 minute advanced to the current time, on every minute. This might be new behavior, as I only noticed this when changing phones (coming from a OnePlus 6T, android 11, to a OnePlus 9 Pro, android 12)
This behavior beaks other apps reading that alarm state, for example openHAB.
Steps to reproduce:
- Set a alarm; Now you can see the system alarm being set at that same time.
- Start sleep tracking; Now you will see the alarm time being updated every minute.
The openHAB logs, receiving updates from the system alarmclock, and MQTT, show this quite nicely:
# Setting my Alarm
Item 'AlarmClock' received command 2022-09-12T05:45:00.000+0000
# Starting tracking
Item 'SleepasAndroid_Event' changed from sleep_tracking_stopped to sleep_tracking_started
Item 'AlarmClock' received command 2022-09-11T21:10:17.000+0000
Item 'AlarmClock' changed from 2022-09-12T05:45:00.000+0000 to 2022-09-11T21:10:17.000+0000
Item 'AlarmClock' received command 2022-09-11T21:11:17.000+0000
Item 'AlarmClock' changed from 2022-09-11T21:10:17.000+0000 to 2022-09-11T21:11:17.000+0000
Item 'AlarmClock' received command 2022-09-11T21:12:17.000+0000
Item 'AlarmClock' changed from 2022-09-11T21:11:17.000+0000 to 2022-09-11T21:12:17.000+0000
Item 'AlarmClock' received command 2022-09-11T21:13:17.000+0000
Item 'AlarmClock' changed from 2022-09-11T21:12:17.000+0000 to 2022-09-11T21:13:17.000+0000
Version of Sleep as Android:
20220609 on Android 12