Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106611

Automation not working | choose element not picking the right path

$
0
0

Hi,

I have the following automation to do a few actions:

  • Lights (hal beneden / boven) on when it is between 07:45 and 23:15 when daylight level is below 8lx for 5 min.
  • Then when the doorbell is pressed (detected) lights in hal beneden for 3 minutes to 100% when lights are on / illuminance level below 8
  • lights off at 23:15
  • when between 23:15 and 07:45 lights on for 3 minutes when motion is detected.

I most likely make an error in my thinking somewhere as it is not working as I expect.
When the doorbell is rang (detected) light do not go to 100%.
Lights also do not switch on when light level is below 8.

Would there be someone so kind to point me in the right direction?

Thank you very much.

Bernard

alias: Hal - Dynamic Lighting with Time and Motion - NEW
description: >-
  Controls lights based on time, illuminance, and motion, with varying
  behaviors.
triggers:
  - entity_id:
      - binary_sensor.voordeur_rzw33_doorbell
    trigger: state
    to: "on"
  - at: "07:45"
    trigger: time
  - at: "23:15"
    trigger: time
  - entity_id: >-
      sensor.hal_bewegingssenor_hal_boven_hal_bewegingssenor_hal_boven_illuminance
    below: 7
    for:
      hours: 0
      minutes: 5
      seconds: 0
    trigger: numeric_state
  - entity_id: >-
      sensor.hal_bewegingssenor_hal_boven_hal_bewegingssenor_hal_boven_illuminance
    above: 6
    for:
      minutes: 5
    trigger: numeric_state
  - entity_id: >-
      binary_sensor.hal_bewegingssenor_hal_boven_hal_bewegingssenor_hal_boven_motion_sensor_status
    to: "on"
    trigger: state
conditions: []
actions:
  - choose:
      - conditions:
          - condition: time
            after: "07:45"
            before: "23:15"
        sequence:
          - choose:
              - conditions:
                  - condition: state
                    entity_id: binary_sensor.voordeur_rzw33_doorbell
                    state: "on"
                  - condition: numeric_state
                    entity_id: >-
                      sensor.hal_bewegingssenor_hal_boven_hal_bewegingssenor_hal_boven_illuminance
                    below: 8
                  - condition: state
                    entity_id: >-
                      light.hal_verlichting_hal_beneden_hal_verlichting_hal_beneden_dimmer_1
                    state: "on"
                sequence:
                  - data:
                      message: Doorbell pressed - Trigger fired
                      level: info
                    action: system_log.write
                  - data:
                      message: "Time condition met: {{ now().strftime('%H:%M') }}"
                      level: info
                    action: system_log.write
                  - data:
                      brightness_pct: 100
                    target:
                      entity_id: >-
                        light.hal_verlichting_hal_beneden_hal_verlichting_hal_beneden_dimmer_1
                    action: light.turn_on
                  - delay:
                      minutes: 3
                  - data:
                      brightness_pct: 20
                    target:
                      entity_id: >-
                        light.hal_verlichting_hal_beneden_hal_verlichting_hal_beneden_dimmer_1
                    action: light.turn_on
              - conditions:
                  - condition: numeric_state
                    entity_id: >-
                      sensor.hal_bewegingssenor_hal_boven_hal_bewegingssenor_hal_boven_illuminance
                    below: 8
                sequence:
                  - data:
                      brightness_pct: 20
                    target:
                      entity_id:
                        - >-
                          light.hal_verlichting_hal_beneden_hal_verlichting_hal_beneden_dimmer_1
                        - >-
                          light.verlichting_hal_boven_hal_verlichting_hal_boven_dimmer_1
                    action: light.turn_on
              - conditions:
                  - condition: numeric_state
                    entity_id: >-
                      sensor.hal_bewegingssenor_hal_boven_hal_bewegingssenor_hal_boven_illuminance
                    above: 8
                sequence:
                  - target:
                      entity_id:
                        - >-
                          light.hal_verlichting_hal_beneden_hal_verlichting_hal_beneden_dimmer_1
                        - >-
                          light.verlichting_hal_boven_hal_verlichting_hal_boven_dimmer_1
                    action: light.turn_off
                    data: {}
      - conditions:
          - condition: time
            after: "23:15"
            before: "07:45"
          - condition: state
            entity_id: >-
              binary_sensor.hal_bewegingssenor_hal_boven_hal_bewegingssenor_hal_boven_motion_sensor_status
            state: "on"
        sequence:
          - data:
              brightness_pct: 10
            target:
              entity_id:
                - >-
                  light.hal_verlichting_hal_beneden_hal_verlichting_hal_beneden_dimmer_1
                - light.verlichting_hal_boven_hal_verlichting_hal_boven_dimmer_1
            action: light.turn_on
          - delay:
              minutes: 3
          - target:
              entity_id:
                - >-
                  light.hal_verlichting_hal_beneden_hal_verlichting_hal_beneden_dimmer_1
                - light.verlichting_hal_boven_hal_verlichting_hal_boven_dimmer_1
            action: light.turn_off
            data: {}
      - conditions:
          - condition: time
            after: "23:15"
        sequence:
          - target:
              entity_id:
                - >-
                  light.hal_verlichting_hal_beneden_hal_verlichting_hal_beneden_dimmer_1
                - light.verlichting_hal_boven_hal_verlichting_hal_boven_dimmer_1
            action: light.turn_off
            data: {}
mode: single

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106611

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>