Device Timestamp Sensor in Automation

Currently, there isn’t a clean way to have an automation or blueprint trigger off a sensor with device_class timestamp. While you can work around it, the way(s) to do so are pretty hacky and fragile.

For example, the blueprint Wake-up light alarm with sunrise effect requires adding date_time_iso and date sensors to configuration.yaml, since it works by starting itself every minute, then using those additional sensors to calculate if it is supposed to execute now or not. As a side effect, automations based on the blueprint can’t be manually triggered.

What I propose instead is to allow triggering off a timestamp value directly, with an offset. Like the Sun trigger:

With support for selecting a ‘Timestamp’ trigger, one could turn on a light 15 minutes before their next phone alarm without any clunky hacks or un-intuitive workarounds.

Surprised there’s been no requests for this. I’m having this exact issue.

Have a timestamp sensor that I’ve been trying to use as a time trigger, and it will not work. I’m assuming this is the reason.

I’m not sure what the work around is…