I doubt anyone would be able to help you until you correctly format your code. There is no way that the way the code you posted above is like that in your config.
The comment is around indenting whitespace. The indentations make no sense at all. If this is exactly how it is specified then that is your problem right there.
I dont understand what you mean. I have like i said around 40 automations. they are all build up like this and are working. i have built them via the UI. i have 5 automations via the alarmclock and 3 are suddenly taking the boolean value on even if its off. eg coffie machine in the morning “off” and the coffie automation triggers anyway. This is exact code worked before!!!
You may be right about that but instead of being argumentative about what we are saying try to at least understand it.
YAML is very whitespace sensitive. That whitespacing includes indentation. and the indentation is especially important when you have mixed and & or conditions
take the following properly formatted example:
- alias: example automation
trigger:
- platform : state
entity_id: whatever_1
to: 'on'
- platform : state
entity_id: whatever_2
to: 'on'
condition:
condition: and
conditions:
- condition: state
entity_id: whatever_3
state: 'off'
- condition: state
entity_id: whatever_4
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: whatever_5
state: 'off'
- condition: state
entity_id: whatever_6
state: 'off'
action:
- service: whatever
entity_id: whatever_7
now look at yours.
I really hope you see the difference now. If I copy and paste your code from above into my config in exactly the same way you have it posted I will get errors!
and besides that aspect just look at the conditions…
This:
condition:
condition: and
conditions:
- condition: state
entity_id: whatever_3
state: 'off'
- condition: state
entity_id: whatever_4
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: whatever_5
state: 'off'
- condition: state
entity_id: whatever_6
state: 'off'
is different than this:
condition:
condition: and
conditions:
- condition: state
entity_id: whatever_3
state: 'off'
- condition: state
entity_id: whatever_4
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: whatever_5
state: 'off'
- condition: state
entity_id: whatever_6
state: 'off'
because the indentation of the last condition is moved to align with the ‘and’ block not the ‘or’ block.
So…if you want us to help you we need to see your code exactly the way it is in your configuration. And what you have posted is not that or you would have errors.
and if you really looked at the linked post then you’ll also see that it didn’t re-format their code to the way you have yours posted. It still maintained proper indentation. So that link was a completely non-related issue.
I see the problem with the UI generated content, yours looks more ‘messed up’ than the other example. Is there a method to fix it? It is impossible to see what is under your or block vs the and block
Just a guess, but it seems like based ONLY on the order of your conditions that input_boolean.tv4alarm is an or condition, so it could still fire when off.
Thank you for your explanation. I found the error and it was another automation with a miss typing. so the one i showed you wasnt the error. all spaces, “and” and “or” are in the correct possistion. i have tripple checked this as well.