actions:
- brightness_pct: 1
  device_id: f5ccc59a8b469ac7dbdf23f714d93c05
  domain: light
  entity_id: f2de93d902b313ed6b1a5b3f848d41fb
  flash: long
  type: turn_on
- brightness_pct: 5
  device_id: 1563a131149b8e2cecc7bf3cc21732d6
  domain: light
  entity_id: 8c3f3da35672a02b677c789969bbea0a
  flash: long
  type: turn_on
- action: counter.reset
  data: {}
  metadata: {}
  target:
    entity_id: counter.counter_for_lights_kuchnia_to_turn_off
- repeat:
    sequence:
    - delay:
        hours: 0
        milliseconds: 0
        minutes: 0
        seconds: 5
    - action: counter.increment
      data: {}
      metadata: {}
      target:
        entity_id: counter.counter_for_lights_kuchnia_to_turn_off
    while:
    - condition: or
      conditions:
      - condition: device
        device_id: 5243fe178006af9adee15bacfc9bcadc
        domain: binary_sensor
        entity_id: de7a9e40d544ab51409925618ef14deb
        type: is_occupied
      - condition: device
        device_id: 66e998859b89cf23b000cc63e1ea9032
        domain: binary_sensor
        entity_id: 584e49486e9e6257cf0fdc764cce39c6
        type: is_occupied
      - condition: device
        device_id: 18f9c114ab3e4b421899bbd6c84a3ba6
        domain: binary_sensor
        entity_id: 5f7a6976e73109acbce02cc2de11259e
        type: is_occupied
    - below: 30
      condition: numeric_state
      entity_id: counter.counter_for_lights_kuchnia_to_turn_off
- device_id: 1563a131149b8e2cecc7bf3cc21732d6
  domain: light
  entity_id: 8c3f3da35672a02b677c789969bbea0a
  type: turn_off
- device_id: f5ccc59a8b469ac7dbdf23f714d93c05
  domain: light
  entity_id: f2de93d902b313ed6b1a5b3f848d41fb
  type: turn_off
alias: Turn on led nad blatem at night
conditions:
- condition: state
  entity_id: input_boolean.on_leave
  state:
  - 'off'
- condition: or
  conditions:
  - condition: state
    entity_id: input_boolean.sleep_mode
    state:
    - 'on'
  - condition: state
    entity_id: input_boolean.night_mode
    state:
    - 'on'
description: ''
id: '1752607981051'
mode: single
triggers:
- device_id: 5243fe178006af9adee15bacfc9bcadc
  domain: binary_sensor
  entity_id: de7a9e40d544ab51409925618ef14deb
  trigger: device
  type: occupied
- device_id: 66e998859b89cf23b000cc63e1ea9032
  domain: binary_sensor
  entity_id: 584e49486e9e6257cf0fdc764cce39c6
  trigger: device
  type: occupied
- device_id: 18f9c114ab3e4b421899bbd6c84a3ba6
  domain: binary_sensor
  entity_id: 5f7a6976e73109acbce02cc2de11259e
  trigger: device
  type: occupied
