Commit cfe5e6fd authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

rework back

parent 73b0d060
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
@@ -85,12 +85,31 @@ action:
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - motion started; Action: light turned on."
      - conditions:
          - condition: trigger
            id: motion
          - condition: state
            entity_id: !input entity_trigger
            state: "off"
          - condition: state
            entity_id: !input entity_target
            state: "on"
        sequence:
          - service: timer.start
            target:
              entity_id: !input timer_no_motion
          - service: logbook.log
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - motion stopped at light; Action: timer 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:
@@ -98,7 +117,7 @@ action:
          - service: logbook.log
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - light started; Action: timer started"
              message: "Condition: trigger - light started manually; Action: timer started."
      - conditions:
          - condition: trigger
            id: light
+21 −2
Original line number Diff line number Diff line
@@ -113,6 +113,23 @@ action:
          - condition: state
            entity_id: !input entity_target
            state: "on"
        sequence:
          - service: timer.cancel
            target:
              entity_id: !input timer_no_motion
          - service: logbook.log
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - motion started at light; Action: timer cancelled."
      - conditions:
          - condition: trigger
            id: motion
          - condition: state
            entity_id: !input entity_trigger
            state: "off"
          - condition: state
            entity_id: !input entity_target
            state: "on"
        sequence:
          - service: timer.start
            target:
@@ -120,13 +137,15 @@ action:
          - service: logbook.log
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - motion started at light; Action: timer (re)started."
              message: "Condition: trigger - motion stopped at light; Action: timer 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:
@@ -134,7 +153,7 @@ action:
          - service: logbook.log
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - light started; Action: timer started"
              message: "Condition: trigger - light started manually; Action: timer started."
      - conditions:
          - condition: trigger
            id: light
+25 −3
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ action:
          - service: logbook.log
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - timer finished; Action: light turned off"
              message: "Condition: trigger - timer finished; Action: light turned off."
      - conditions:
          - condition: trigger
            id: motion
@@ -122,6 +122,26 @@ action:
          - condition: state
            entity_id: !input entity_light_main
            state: "off"
        sequence:
          - service: timer.cancel
            target:
              entity_id: !input timer_no_motion
          - service: logbook.log
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - motion started at light; Action: timer cancelled."
      - conditions:
          - condition: trigger
            id: motion
          - condition: state
            entity_id: !input entity_trigger
            state: "off"
          - condition: state
            entity_id: !input entity_target
            state: "on"
          - condition: state
            entity_id: !input entity_light_main
            state: "off"
        sequence:
          - service: timer.start
            target:
@@ -129,13 +149,15 @@ action:
          - service: logbook.log
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - motion started at light; Action: timer (re)started."
              message: "Condition: trigger - motion stopped at light; Action: timer 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:
@@ -143,7 +165,7 @@ action:
          - service: logbook.log
            data_template:
              name: "Blueprint #"
              message: "Condition: trigger - light started; Action: timer started"
              message: "Condition: trigger - light started manually; Action: timer started."
      - conditions:
          - condition: trigger
            id: light