Kapunyitás: Accord

 avatar
user_4999651
plain_text
7 months ago
3.7 kB
0
Indexable
Never
alias: "Kapunyitás:  Accord"
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.accord
    from: "off"
    to: "on"
condition: []
action:
  - if:
      - condition: numeric_state
        entity_id: sensor.accord_uptime
        below: 15
    then:
      - service: script.kapu_nyitas_vb1_autora
        data: {}
      - if:
          - condition: state
            entity_id: sensor.bori_wifiap
            state: Udvar
        then: []
        else:
          - service: switch.turn_on
            data: {}
            target:
              entity_id: switch.nagygarazs_nyitas
          - wait_for_trigger:
              - platform: state
                entity_id:
                  - sensor.bori_wifiap
                to: Udvar
              - platform: state
                entity_id:
                  - binary_sensor.accord
                from: "on"
                to: "off"
            timeout:
              hours: 0
              minutes: 5
              seconds: 0
              milliseconds: 0
          - service: switch.turn_on
            data: {}
            target:
              entity_id:
                - switch.nagygarazs_zaras
      - wait_for_trigger:
          - platform: state
            entity_id:
              - binary_sensor.accord
            from: "on"
            to: "off"
            for:
              hours: 0
              minutes: 0
              seconds: 5
          - platform: numeric_state
            entity_id: sensor.accord_signal
            for:
              hours: 0
              minutes: 0
              seconds: 6
            below: -74
        timeout:
          hours: 0
          minutes: 10
          seconds: 0
          milliseconds: 0
    else:
      - service: script.kapu_nyitas_vb1_autora
        data: {}
      - service: switch.turn_on
        data: {}
        target:
          entity_id:
            - switch.nagygarazs_nyitas
      - wait_for_trigger:
          - platform: state
            entity_id:
              - binary_sensor.accord
            from: "on"
            to: "off"
            for:
              hours: 0
              minutes: 0
              seconds: 10
      - delay:
          hours: 0
          minutes: 0
          seconds: 1
          milliseconds: 0
      - if:
          - condition: state
            entity_id: sensor.bori_wifiap
            state: Udvar
        then:
          - delay:
              hours: 0
              minutes: 0
              seconds: 5
              milliseconds: 0
        else:
          - if:
              - condition: numeric_state
                entity_id: sensor.homerseklet_nagygarazs
                above: 15
            then:
              - wait_for_trigger:
                  - platform: state
                    entity_id:
                      - binary_sensor.lumi_lumi_sensor_magnet_aq2_opening
                    to: "on"
                  - platform: state
                    entity_id:
                      - binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_2
                    to: "on"
                  - platform: state
                    entity_id:
                      - binary_sensor.lumi_lumi_sensor_magnet_opening
                    to: "on"
                timeout:
                  hours: 0
                  minutes: 3
                  seconds: 0
                  milliseconds: 0
            alias: Külső hőmérséklet > 15 °C
        alias: Gépjármű az Udvaron van?
      - service: switch.turn_on
        data: {}
        target:
          entity_id: switch.nagygarazs_zaras
    alias: Timer < 15sec
  - service: script.kapu_zaras_parancs
    data: {}
mode: single
Leave a Comment