Time and Location Conditions do not test on Equal

As far as I can tell the Time and Location condition only offers before and after. There is no text for equal.

I know I would use a template with =, >=, <= to solve this, but it might be a lot simpler if = were included in the Time and Location condition.

Maybe I’m missing something.

Thanks

Time keeps moving forward… even as an automation is running. With sub-second precision, the likelihood that the current time would match your target time exactly is very, very small. With that in mind, the most reasonable and reliable tests are whether it is currently before or after a specified time.

No, you couldn’t… at least not reliably. Templates that compare now() update at the top of each minute, but you run into the same issue of time moving forward as each template containing now() is rendered in its turn. Trigger templates like {{ now() == states('sensor.time')|as_datetime|as_local }} may fire occasionally, but a search of these forums will reveal numerous threads where users experience no trigger events or very unreliable triggers.

this is prob more appropriate for the feature request category.

comparing specific times also is challenging because with measurment going to sub-second, having things be eactly == may be pretty uncommon.

though i do find some use cases of “in range” where i’d like it to test if it’s within a specific range of time around a target time. of course all this could be done in templates, but op is postulating what might get enough use to warrant putting it in the ui. i’d rather have “in range” than ==… which could be used as == if you set the range to 0