• 0 Posts
  • 8 Comments
Joined 1 year ago
cake
Cake day: July 15th, 2023

help-circle





  • I would just use the old “Home changes to 0” state, and add a conditional for night (not night) and another for a triggered timer. I call my timer “Nanny mode”, and it just blocks ‘away from home’ automations while it’s running. I just need to remember to hit a button on my dashboard once a day or so, starting the 16h timer.

    Here’s my “set the alarm and lower the blinds when we leave, and put them back when we get home” auto:

    description: ""
    trigger:
      - platform: state
        entity_id:
          - zone.home
        to: "0"
        for:
          hours: 0
          minutes: 1
          seconds: 0
        id: Left home
      - platform: state
        entity_id:
          - zone.home
        from: "0"
        id: Came home
    condition:
      - condition: not
        conditions:
          - condition: state
            entity_id: timer.nanny_mode
            state: active
    action:
      - choose:
          - conditions:
              - condition: trigger
                id: Left home
            sequence:
              - service: alarmo.arm
                data:
                  mode: away
                  skip_delay: true
                  entity_id: alarm_control_panel.alarmo
              - service: cover.set_cover_position
                data:
                  position: 0
                target:
                  entity_id:
                    - cover.front_room_blinds
          - conditions:
              - condition: trigger
                id:
                  - Came home
              - condition: or
                conditions:
                  - condition: state
                    entity_id: alarm_control_panel.alarmo
                    state: armed_away
                  - condition: state
                    entity_id: alarm_control_panel.alarmo
                    state: triggered
                  - condition: state
                    entity_id: alarm_control_panel.alarmo
                    state: pending
            sequence:
              - choose:
                  - conditions:
                      - condition: sun
                        before: sunrise
                        after: sunset
                    sequence:
                      - service: alarmo.disarm
                        data:
                          entity_id: alarm_control_panel.alarmo
                      - device_id: #######
                        domain: alarm_control_panel
                        entity_id: #######
                        type: disarm
                  - conditions:
                      - condition: sun
                        after: sunrise
                        before: sunset
                    sequence:
                      - service: cover.set_cover_position
                        data:
                          position: 100
                        target:
                          entity_id: cover.front_room_blinds
                      - service: alarmo.disarm
                        data:
                          entity_id: alarm_control_panel.alarmo
                      - device_id: #####
                        domain: alarm_control_panel
                        entity_id: #####
                        type: disarm
    mode: single