Unexpected value for condition: ‘[{‘condition’: ‘state’, ‘entity_id’: ‘binary_sensor.windows_sensor_kitchen’, ‘state’: ‘on’}]’. Expected and, device, not, numeric_state, or, state, sun, template, time, trigger, zone, a list of conditions or a valid template @ data[‘sequence’][1]. Got {‘service’: ‘climate.turn_off’, ‘entity_id’: ‘climate.2_keuken’, ‘condition’: [{‘condition’: ‘state’, ‘entity_id’: ‘binary_sensor.windows_sensor_kitchen’, ‘state’: ‘on’}]}
looking at the error, it looks like you have a service call (climate.turn_off) in a condition block. might be a tab/indent issue? can’t really tell b/c we can’t see the code.
This isn’t valid code. the indent’s wrong, it’s missing the sequence, that’s now how you do a foreach. that’s not how you reference repeat items, and i don’t know what you’re doing on the condition of the servic. trying to do an if? may not be necessary since you’re turning off something that’s off, but still…
looks like you may early in learning the yaml level programming? why not do this in the ui? almost every mistake would have been caught for you in the ui. the below might be closer to what you are trying to do, but not sure.
The UI will certainly help. It won’t magically solve all but it would have caught most of the errors you had (not all).
but start from what I gave you. Put it in via the UI… What errors are you still getting? You need to update your calling automation to call this but then you certainly should not get the unknown service error anymore…