Checking the new 'not' condition

just to be sure, please have a look if this is the correct order for the new not condition, which should be and’ed with another condition:

Up to now, I wrote it as:

    condition:
      - condition: template
        value_template: >
          {{states('light.parking_light') != 'unavailable'}}
      - condition: state
        entity_id: binary_sensor.outside_daylight_sensor
        state: 'on'

and I think, it should be like this now?:

    condition:
      - condition: not
        conditions:
          condition: state
          entity_id: light.parking_light
          state: unavailable
      - condition: state
        entity_id: binary_sensor.outside_daylight_sensor
        state: 'on'

meaning, the parking light should not be unavailable, and daylight sensor should be on. I am a bit uncertain about the double (quadruple) wording of the first condition listing…
thanks for checking if you would

This is the correct use of the NOT condition. But you have to use the AND or OR two for the second condition.
And the “unavailable” might be wrong. You could check that in the development tab under states. It might be “unknown” instead.

HI Thanks for chiming in.
Not sure why you would say that. Listed conditions are ‘And’ed’ by default, meaning

condition:
  - condition: 1
  - condition: 2

are always and’ed. Thats the main construction I am using here.
About the unavailable, that’s correct too… It actually is unavailable, and I need to check the condition for it not to be :wink:

My main worry was(is) the rather complicated construction of the first part, because I am only using 1 ‘not’ condition, and still have to declare the ‘conditions:’

thanks!

Sorry, didn’t actually knew that :grimacing:

That is how it is, afaik. Even when using 1 condition.

Can not be used in a script?