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

My toilet light automation: help with improvement

$
0
0

Hello all,

i have a toiletlight automation where a philips huw doorsensor is the trigger, the first version had the flaw that sometimes the light was immediatly switched off again. To overcome this I came up with this automation, the subparts where added later, if you remove these 2 subparts, you seen the original automation:
can You guys help me with improving this automation?
.

alias: Toilet_automaat_lamp
description: >-
  Binnenkomen toilet triggert lamp ikea aan, wacht op trigger deur weer dicht.
  Na toiletbezoek, trigger deur van gesloten naar open en dan weer van open naar
  dicht, lamp uitzetten
triggers:
  - type: turned_on
    device_id: e410424c5acc9fa683a5336ab3bfe59b
    entity_id: ce000fc758ec5b29bfb1dc057849aa21
    domain: light
    trigger: device
conditions: []
actions:
  - device_id: e410424c5acc9fa683a5336ab3bfe59b
    domain: light
    entity_id: ce000fc758ec5b29bfb1dc057849aa21
    type: brightness_increase
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - if:
      - condition: state
        entity_id: light.tuinlamp_linksmidden
        state: "off"
    then:
      - type: turn_on
        device_id: e410424c5acc9fa683a5336ab3bfe59b
        entity_id: ce000fc758ec5b29bfb1dc057849aa21
        domain: light
        brightness_pct: 100
      - wait_for_trigger:
          - trigger: state
            entity_id:
              - binary_sensor.hue_secure_contact_sensor_2_openen
            from: "off"
            to: "on"
        continue_on_timeout: false
      - delay:
          hours: 0
          minutes: 0
          seconds: 1
      - type: turn_off
        device_id: e410424c5acc9fa683a5336ab3bfe59b
        entity_id: ce000fc758ec5b29bfb1dc057849aa21
        domain: light
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - if:
      - condition: state
        entity_id: light.tuinlamp_linksmidden
        state: "off"
    then:
      - type: turn_on
        device_id: e410424c5acc9fa683a5336ab3bfe59b
        entity_id: ce000fc758ec5b29bfb1dc057849aa21
        domain: light
        brightness_pct: 100
      - delay:
          hours: 0
          minutes: 0
          seconds: 1
      - wait_for_trigger:
          - trigger: state
            entity_id:
              - binary_sensor.hue_secure_contact_sensor_2_openen
            from: "off"
            to: "on"
        continue_on_timeout: false
      - delay:
          hours: 0
          minutes: 0
          seconds: 1
      - type: turn_off
        device_id: e410424c5acc9fa683a5336ab3bfe59b
        entity_id: ce000fc758ec5b29bfb1dc057849aa21
        domain: light
  - delay:
      hours: 0
      minutes: 0
      seconds: 10
      milliseconds: 0
  - wait_for_trigger:
      - trigger: state
        entity_id:
          - binary_sensor.hue_secure_contact_sensor_2_openen
        from: "off"
        to: "on"
    continue_on_timeout: false
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
  - type: turn_off
    device_id: e410424c5acc9fa683a5336ab3bfe59b
    entity_id: ce000fc758ec5b29bfb1dc057849aa21
    domain: light
mode: single

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 107403

Trending Articles



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