automation:-alias:"Office at evening"trigger:-platform:stateentity_id:sensor.office_occupancyto:"on"action:-service:notify.notifydata:message:"Testing conditional actions"-condition:or#后面就是执行中加判断,conditions:-condition:numeric_stateentity_id:sun.sunattribute:elevationbelow:4-condition:stateentity_id:sensor.office_illuminancebelow:10-service:scene.turn_ontarget:entity_id:scene.office_at_evening
Conditions can also be part of an action. You can combine multiple service calls and conditions in a single action, and they will be processed in the order you put them in. If the result of a condition is false, the action will stop there so any service calls after that condition will not be executed.