Create sensors from an entity state with <, >, = -how?

Hi, I’d ilke to create a “window open” sensor that is “on” when a value from a tilt sensor crosses certain threshold (for example, sensor.window_open=on when sensor.tilt_y > 0).

How do I do that? I could probably do it with two automations but that’s inelegant. Thank you!

You would create a template binary sensor for this.

You give it the state and expected condition and itll either true or fales (on or off).

1 Like

Thank you, I see I already have some of these in my config. Case closed.