Lars72
(Lars Künnemann)
1
Hi,
I tried to code a automation with “and / or conditions” and get the error message: not supported condition: and
my code:
alias: Küche Licht an
trigger:
- entity_id: binary_sensor.fibaro_system_fgms001zw5_motion_sensor_sensor
from: 'off'
platform: state
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: light.fibaro_system_fgd212_dimmer_2_level_3
state: 'off'
- condition: or
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
action:
- service: light.turn_on
entity_id: light.fibaro_system_fgd212_dimmer_2_level_3
- delay: 0:05
- service: light.turn_off
entity_id: light.fibaro_system_fgd212_dimmer_2_level_3
Does somebody has an idea where the error is?
Thanks
callifo
(Callifo)
2
Formatting? Your spacing looks different to mine, otherwise it looks completely the same,
condition:
condition: and
conditions:
- condition: state
entity_id: group.people_status
state: 'home'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.empty_dishwasher
state: 'on'
- condition: state
entity_id: input_boolean.empty_washingmachine
state: 'on'
- condition: state
entity_id: input_boolean.empty_dryer
state: 'on'
“not supported condition” is an error in the UI editor because OR conditions aren’t supported by it.
What happens when you actually run the code?
petro
(Petro)
4
I’ve seen this before. The solution I went with was to use the alternative format for and:
condition:
- condition: state
entity_id: light.fibaro_system_fgd212_dimmer_2_level_3
state: 'off'
- condition: or
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
It will treat each condition as and when just listed in condition:.
Lars72
(Lars Künnemann)
5
Thank you for your answers. I think mf_social is right. It seems to be an error in the UI Editor. Everything is fine now.
1 Like