Thanks for the quick reply @Tinkerer
I had used the ‘colon’ still get an error when I use AND/OR conditions in the YAML file. Below is the error I get:
Unsupported condition: and
{
"condition": "and",
"conditions": [
{
"condition": "state",
"entity_id": "MY MOBILE ID",
"state": "away"
},
{
"condition": "state",
"entity_id": "WIFES MOBILE ID",
"state": "away"
}
]
}
And this is the code in the yaml:
condition:
condition: and
conditions:
- condition: state
entity_id: MY MOBILE ID
state: away
- condition: state
entity_id: WIFES MOBILE ID
state: away
The same for when I’m using the OR condition:
{
"condition": "or",
"conditions": [
{
"condition": "state",
"entity_id": "MY DEVICE ID",
"state": "home"
},
{
"condition": "state",
"entity_id": "WIFE DEVICE ID",
"state": "home"
}
]
}
The code in the yaml for the OR condition is:
ondition:
condition: or
conditions:
- condition: state
entity_id: MY DEVICE ID
state: home
- condition: state
entity_id: WIFE DEVICE ID
state: home
Basically, what I want to do is, at sunset, if no one is home, switch on the SONOFF switch, if someone IS home, then that Sonoff switch should be turned on at 00:00.
Then there is a automation to switch it off at sunrise with no conditions…