Condition sensor update after datetime helper

I want to have a condition if a sensor has updated after the value of a datetime helper.

Sometimes I forget to put on my watch before going to bed.
I already have a datetime helper that gets updated when I take a shower.
When my nighttime automation fires, I want to check if my pulse have been updated after the datetime helper has been updated as a mean to check if I put my watch on again.

I realize I probably need a template condition, but I don’t know how to write one.
Can anyone help me with this? I assume it’s somthing like
“sensor.pixel_9_pro_xl_heart_rate > input_datetime.bad_luftfuktighet”?

If you want to know if the heart rate sensor’s state updated later than the input datetime’s state updated it would be:

{{ states.sensor.pixel_9_pro_xl_heart_rate.last_changed > states.input_datetime.bad_luftfuktighet.last_changed }}

But, if you want to know if the heart rate sensor’s state updated later than the the value stored by the input datetime , that would be:

{{ states.sensor.pixel_9_pro_xl_heart_rate.last_changed > 
states('input_datetime.bad_luftfuktighet') | as_datetime }}

Thank you so much!
the template works great. sadly it seems the sensor is updated even when I don’t have my watch on my wrist.