is there any way this could be fixed? can I easily create a timestamp sensor based on this, or maybe an input_datetime automatically? complexing factor of course is the template it should follow.
or should I use a trigger template instead?
{{ states('sensor.time') == states('sensors.alarmclock_wd_time') if states('sensors.alarmclock_wd_time') != 'Not set'}}
You can easily add device_class: timestamp to your sensor config, but the docs say:
timestamp: Datetime object or timestamp string (ISO 8601).
I don’t know if your HH:MM will work for that.
Your template trigger will work fine, although it will be evaluated every minute. In reality, that doesn’t matter unless you have an insanely-busy system running off underpowered hardware.
IMO, the best alternative would be to change your frontend to use a time-only input_datetime instead of separate hour and minute numbers, and you can then trigger directly off that.
well, yes, should have mentioned that sorry, I did try and add the device_class, but then the frontend shows invalid timestamp error on that sensor, instead of the time string it now does. probably need to add the isoformat to it also.
If you really want your separate hour / minute numbers, you could set up an automation to mirror them into an input_datetime (which you’ll need to create first):
I’ll first check the input_datetime and see how that handles a mobile action, and if not, at least add the automation. (there’s a whole bunch of other sensors using the separate hours/minutes in my config, so that requires a lot of checking out. Legacy that works flawlessly, do I keep building around it, or do a rewrite all of it… choices choices
but wait, I have an input_datetime, which I almost never use (, because I don’t want the home telling me to go to bed…)
Also, I now remember this is not used because of the clumsiness in handling:
which is a bit bare-bones, but what more do we need, plain and simple, with built-in embed. very nice @georgeSG, if you read this, thank you very much!