Help Comparing Times

Hi,

I am trying to come up with a notification for my vacuum completing a clean. The room is big enough and it goes back to the dock to charge. So I can’t do a state to returning from cleaning.

I was thinking of using the clean_stop time since it does not update until the job is complete.

clean_stop: 2020-11-03T07:00:09

I also have a simple time/date sensor which returns:

2020-11-03 20:11:00

I’d like to take the seconds out of the time when comparing. What is the best way I can compare these?
"{{state_attr('vacuum.name', 'clean_stop') == states.sensor.simple_time_date}}"

Thank you.

Look here for some info on this: