Loading automation/motion_light_timer_condition_illuminance_main.yaml +28 −6 Original line number Diff line number Diff line Loading @@ -83,12 +83,19 @@ action: - service: light.turn_off target: entity_id: !input entity_target - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - timer finished; Action: light turned off" - conditions: - condition: trigger id: motion - condition: state entity_id: !input entity_trigger state: "on" - condition: state entity_id: !input entity_target state: "off" - condition: numeric_state entity_id: !input entity_illuminance below: !input entity_illuminance_value Loading @@ -99,15 +106,16 @@ action: - service: light.turn_on target: entity_id: !input entity_target - service: timer.cancel target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - motion started at dark; Action: light turned on." - conditions: - condition: trigger id: motion - condition: state entity_id: !input entity_trigger state: "off" state: "on" - condition: state entity_id: !input entity_target state: "on" Loading @@ -118,18 +126,24 @@ action: - service: timer.start target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - motion started at light; Action: timer (re)started." - conditions: - condition: trigger id: light - condition: state entity_id: !input entity_target state: "on" - condition: template value_template: "{{ trigger.to_state.context.parent_id == none }}" sequence: - service: timer.start target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - light started; Action: timer started" - conditions: - condition: trigger id: light Loading @@ -140,6 +154,10 @@ action: - service: timer.cancel target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - light stopped; Action: timer cancelled" - conditions: - condition: trigger id: light_main Loading @@ -153,3 +171,7 @@ action: - service: timer.cancel target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - main light started; Action: light stopped, timer cancelled" Loading
automation/motion_light_timer_condition_illuminance_main.yaml +28 −6 Original line number Diff line number Diff line Loading @@ -83,12 +83,19 @@ action: - service: light.turn_off target: entity_id: !input entity_target - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - timer finished; Action: light turned off" - conditions: - condition: trigger id: motion - condition: state entity_id: !input entity_trigger state: "on" - condition: state entity_id: !input entity_target state: "off" - condition: numeric_state entity_id: !input entity_illuminance below: !input entity_illuminance_value Loading @@ -99,15 +106,16 @@ action: - service: light.turn_on target: entity_id: !input entity_target - service: timer.cancel target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - motion started at dark; Action: light turned on." - conditions: - condition: trigger id: motion - condition: state entity_id: !input entity_trigger state: "off" state: "on" - condition: state entity_id: !input entity_target state: "on" Loading @@ -118,18 +126,24 @@ action: - service: timer.start target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - motion started at light; Action: timer (re)started." - conditions: - condition: trigger id: light - condition: state entity_id: !input entity_target state: "on" - condition: template value_template: "{{ trigger.to_state.context.parent_id == none }}" sequence: - service: timer.start target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - light started; Action: timer started" - conditions: - condition: trigger id: light Loading @@ -140,6 +154,10 @@ action: - service: timer.cancel target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - light stopped; Action: timer cancelled" - conditions: - condition: trigger id: light_main Loading @@ -153,3 +171,7 @@ action: - service: timer.cancel target: entity_id: !input timer_no_motion - service: logbook.log data_template: name: "Blueprint #" message: "Condition: trigger - main light started; Action: light stopped, timer cancelled"