My Coffee Machine takes roughly 20 minutes to heat up. As I want to have a warm machine after waking up, I need kind of a trigger offset.
But how can I subtract 20 Minutes from sensor.mobile_app_next_alarm?
I was under the impression offset would do the Trick, but failed. Only with sun.
Do you have any Ideas?
It’s a timestamp as far as I understand. The ordinary “next Alarm” Sensor from the App.
Yours returns TypeError: unsupported operand type(s) for -: 'str' and 'datetime.timedelta'
2022-01-20T07:00:00+00:00
Local Time: Thu Jan 20 08:00:00 GMT+01:00 2022
Package: com.oneplus.deskclock
Time in Milliseconds: 1642662000000
device_class: timestamp
icon: mdi:alarm
friendly_name: Jarvis App Next Alarm
Well, almost. sensor.mobile_app_next_alarm returns 2022-01-20T07:00:00+00:00, where the other returns 2022-01-20 07:40:00+01:00 (without the ‘T’)
Is there a different formatting possible?
Would this be the right source for additional reads: datetime — Basic date and time types — Python 3.10.2 documentation ?