Hi guys,
I am trying to configure my automations.yaml file to include a condition whereby the automation will only run if the TV (media_player.sony_bravia_tv) is OFF and either one or both of our phones are home.
I followed the section titled " MIXED AND AND OR CONDITIONS" on the Docs page https://www.home-assistant.io/docs/scripts/conditions/
This is what I have so far…
condition:
condition: and
conditions:
- condition: state
entity_id: media_player.sony_bravia_tv
state: ‘OFF’
- condition: or
conditions:
- condition: state
entity_id: device_tracker.3c_28_6d_1f_73_dc
state: home
- condition: state
entity_id: device_tracker.18_65_90_83_67_56
state: home
When I check my config I get “Configuration valid!” but when I view the automation using the Configuration ? Automation editor I see an error message that says
Unsupported condition: and
{
“condition”: “and”,
“conditions”: [
{
“condition”: “state”,
“entity_id”: “media_player.sony_bravia_tv”,
“state”: “OFF”
},
{
“condition”: “or”,
“conditions”: [
{
“condition”: “state”,
“entity_id”: “device_tracker.3c_28_6d_1f_73_dc”,
“state”: “home”
},
{
“condition”: “state”,
“entity_id”: “device_tracker.18_65_90_83_67_56”,
“state”: “home”
}
]
}
]
}
This is all quite new to me so any advice would be greatly appreciated.