Why isn’t there a logic NOT operator when writing automations?

Maybe I’m missing it but sometimes when I write an automation I want to check if an entity is NOT in a state.

For example my dryer can be in one of four states: idle, running, finishing or dry.

I would like to be able to do: if clothes_dryer NOT idle do something.

Right now in order to make that happen, I say: if clothes_dryer is (running or finishing or dry) do something.

There is! Multiple actually

:slight_smile:

There is the not condition:

Which is available in both YAML & the UI and can be wrapped around anything.

Awesome. Thanks frenck. I thought there had to be a way, I was just coming up empty on my searches.

1 Like

Hey! An easy WTH to solve, no programming involved even :joy: I’ll take it :smiley:

2 Likes