benleb / ad-automoli

πŸ’‘ Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features
https://github.com/benleb/ad-automoli
MIT License
110 stars 29 forks source link

Upgrading HA AppDaemon addon to 0.8.0 (4.2.0 AppDaemon) breaks AutoMoLi #90

Closed henrikeri closed 2 years ago

henrikeri commented 2 years ago

😩 Describe the issue/bug After upgrading to AppDaemon 4.2.0 (AppDaemon addon version 0.8.0) in HomeAssistant, AutoMoLi turns on all associated lights regardless of whether there is motion or not.

πŸ˜’ Expected behavior AutoMoLi respects motion triggers and keeps lights off when there isn't any motion

πŸŽ›οΈ Configuration

trapp:
  module: automoli
  class: AutoMoLi
  room: trapp
  delay: 120
  motion_state_on: "on"
  motion_state_off: "off"
  transition_on_daytime_switch: true
  daytimes:
    - { starttime: "07:30", name: day, light: 80 }
    - { starttime: "18:30", name: evening, light: 40 }
    - { starttime: "23:00", name: night, light: 25 }
  lights:
    - light.lampe_trapp
  motion:
    - binary_sensor.multisensor_gang_1_etg_home_security_motion_detection
    - binary_sensor.multisensor_gang_2_etg_home_security_motion_detection

kjokken:
  module: automoli
  class: AutoMoLi
  room: kitchen
  delay: 120
  motion_state_on: "on"
  motion_state_off: "off"
  transition_on_daytime_switch: true
  daytimes:
    - { starttime: "07:30", name: day, light: 85 }
    - { starttime: "18:30", name: evening, light: 40 }
    - { starttime: "23:00", name: night, light: 20 }
  lights:
    - light.taklys_kjokken
    - light.skaplys_kjokken
  motion:
    - binary_sensor.multisensor_kjokken_home_security_motion_detection

spisestue:
  module: automoli
  class: AutoMoLi
  room: spisestue
  delay: 1200
  motion_state_on: "on"
  motion_state_off: "off"
  transition_on_daytime_switch: true
  daytimes:
    - { starttime: "07:30", name: day, light: 80 }
    - { starttime: "18:30", name: evening, light: 40 }
    - { starttime: "23:00", name: night, light: 20 }
  lights:
    - light.taklampe_spisestue
    - light.taklys_spisestue
    - light.vegglampe_spisestue
  motion:
    - binary_sensor.multisensor_spisestue_home_security_motion_detection

gang_1_etasje:
  module: automoli
  class: AutoMoLi
  room: gang_1_etasje
  delay: 120
  motion_state_on: "on"
  motion_state_off: "off"
  transition_on_daytime_switch: true
  daytimes:
    - { starttime: "07:30", name: day, light: 80 }
    - { starttime: "18:30", name: evening, light: 40 }
    - { starttime: "23:00", name: night, light: 20 }
  lights:
    - light.taklys_gang_1_etg
  motion:
    - binary_sensor.multisensor_gang_1_etg_home_security_motion_detection

gang_1_etasje_bordlampe:
  module: automoli
  class: AutoMoLi
  room: gang_1_etasje
  delay: 120
  motion_state_on: "on"
  motion_state_off: "off"
  transition_on_daytime_switch: true
  daytimes:
    - { starttime: "07:30", name: day, light: 100 }
    - { starttime: "18:30", name: evening, light: 80 }
    - { starttime: "23:00", name: night, light: 40 }
  lights:
    - light.bordlampe_gang_nede
  motion:
    - binary_sensor.multisensor_gang_1_etg_home_security_motion_detection  

gang_2_etasje:
  module: automoli
  class: AutoMoLi
  room: gang_2_etasje
  delay: 120
  motion_state_on: "on"
  motion_state_off: "off"
  transition_on_daytime_switch: true
  daytimes:
    - { starttime: "07:30", name: day, light: 80 }
    - { starttime: "18:30", name: evening, light: 41 }
    - { starttime: "23:00", name: night, light: 20 }
  lights:
    - light.taklys_gang_2_etg
  motion:
    - binary_sensor.multisensor_gang_2_etg_home_security_motion_detection

bad_1_etasje:
  module: automoli
  class: AutoMoLi
  room: bad_1_etasje
  delay: 300
  motion_state_on: "on"
  motion_state_off: "off"
  transition_on_daytime_switch: true
  daytimes:
    - { starttime: "07:30", name: day, light: 95 }
    - { starttime: "18:30", name: evening, light: 40 }
    - { starttime: "23:00", name: night, light: 20 }
  lights:
    - light.speillys_bad_1_etg
    - light.taklys_bad_1_etg
  motion:
    - binary_sensor.multisensor_bad_1_etg_home_security_motion_detection

bad_2_etasje:
  module: automoli
  class: AutoMoLi
  room: bad_2_etasje
  delay: 300
  motion_state_on: "on"
  motion_state_off: "off"
  transition_on_daytime_switch: true
  daytimes:
    - { starttime: "07:30", name: day, light: 95 }
    - { starttime: "18:30", name: evening, light: 50 }
    - { starttime: "23:00", name: night, light: 25 }
  lights:
    - light.speillys_bad_2_etg
    - light.taklys_bad_2_etg
  motion:
    - binary_sensor.multisensor_bad_2_etg_home_security_motion_detection

vaskerom:
  module: automoli
  class: AutoMoLi
  room: vaskerom
  delay: 300
  motion_state_on: "on"
  motion_state_off: "off"
  transition_on_daytime_switch: true
  daytimes:
    - { starttime: "07:30", name: day, light: 95 }
    - { starttime: "18:30", name: evening, light: 40 }
    - { starttime: "23:00", name: night, light: 20 }
  lights:
    - light.taklys_vaskerom
  motion:
    - binary_sensor.multisensor_vaskerom_home_security_motion_detection

🧠 System

πŸ—’οΈ Logs


2022-01-08  09:54:05.080946 INFO replay_lights: did not turn light.skaplys_kjokken  off because input_boolean.bortemodusbryter is not on
--
2022-01-08  09:54:05.057591 INFO replay_lights: did not turn light.taklys_kjokken  off because input_boolean.bortemodusbryter is not on
2022-01-08 09:54:05.046080 INFO AppDaemon: Previous message repeated 3 times
2022-01-08  09:53:45.156239 INFO replay_lights: did not turn  light.vaskerom_taklys_vaskerom_dimmer off because  input_boolean.bortemodusbryter is not on
2022-01-08  09:53:45.134237 INFO replay_lights: did not turn light.taklys_vaskerom  off because input_boolean.bortemodusbryter is not on
2022-01-08 09:53:45.120001 INFO AppDaemon: Previous message repeated 139 times
2022-01-08  09:53:10.792363 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.733083 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.725749 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.718020 INFO bad_1_etasje:  motion_event: light in Bad_1_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:10.708583 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.627427 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.620570 INFO bad_1_etasje:  motion_event: light in Bad_1_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:10.612166 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:10.605421 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.598205 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.591437 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.584030 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:10.569045 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:10.568910 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:10.522954 INFO AppDaemon: Previous message repeated 1 times
2022-01-08 09:53:10.522277 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:10.418445 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.410539 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.402873 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.394737 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:10.378810 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:10.355715 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.354631 INFO vaskerom:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.353505 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.352432 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.351238 INFO vaskerom:  motion_detected: light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.346486 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.345365 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.344231 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.343147 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:10.342009 INFO bad_2_etasje:  motion_detected:  light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.337706 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.336645 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.335572 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.334567 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:10.333459 INFO bad_1_etasje:  motion_detected:  light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.328709 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.327556 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.326421 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.325327 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:10.324138 INFO gang_2_etasje:  motion_detected:  light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.319818 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.318707 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.317608 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.316561 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:10.315453 INFO gang_1_etasje_bordlampe:  motion_detected:  light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.310737 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.309655 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.308491 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.307438 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:10.306314 INFO gang_1_etasje:  motion_detected:  light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.301787 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.300661 INFO spisestue:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.299539 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.298387 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:10.297097 INFO spisestue:  motion_detected:  light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.292514 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.291339 INFO kjokken:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.290066 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.288817 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.287460 INFO kjokken:  motion_detected: light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.281648 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.280550 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.279435 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.278412 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.277260 INFO trapp:  motion_detected: light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.272665 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.271548 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklys_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:10.270455 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.269405 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.268237 INFO trapp:  motion_detected: light.spisestue_taklys_spisestue_dimmer changed state from off to on
2022-01-08 09:53:10.268103 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:10.236676 INFO AppDaemon: Previous message repeated 1 times
2022-01-08 09:53:10.165139 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.164015 INFO vaskerom:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.162874 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.161789 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.160550 INFO vaskerom:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.155803 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.154425 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.152769 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.151069 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.149801 INFO bad_2_etasje:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.144410 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.143173 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.141946 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.140897 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.139673 INFO bad_1_etasje:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.134843 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.133761 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.132645 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.131605 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.130441 INFO gang_2_etasje:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.126410 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.125273 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.123597 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.122365 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.121187 INFO gang_1_etasje_bordlampe:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.116799 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.115695 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.114570 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.113549 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.112402 INFO gang_1_etasje:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.107795 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.106695 INFO spisestue:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.105585 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.104551 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.103434 INFO spisestue:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.099416 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.098330 INFO kjokken:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.097014 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.095938 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.094727 INFO kjokken:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.090517 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.089431 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.088301 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.087251 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.086082 INFO trapp:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.081441 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:10.080309 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklys_spisestue' \|  self.dimming = False
2022-01-08  09:53:10.079162 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:10.078112 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:10.076928 INFO trapp:  motion_detected: light.taklys_spisestue changed state from off to on
2022-01-08 09:53:10.076782 INFO trapp: Previous message repeated 1 times
2022-01-08  09:53:10.066059 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:10.002337 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.993417 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.986600 INFO bad_1_etasje:  motion_event: light in Bad_1_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.979418 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.896915 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.887601 INFO bad_1_etasje:  motion_event: light in Bad_1_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.880092 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.872602 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.864680 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.857509 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.849658 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.833991 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.833853 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:09.771413 INFO AppDaemon: Previous message repeated 1 times
2022-01-08 09:53:09.770888 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:09.653656 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.645179 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.637944 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.630360 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.613077 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.587920 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.586800 INFO vaskerom:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.585712 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.584683 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:09.583537 INFO vaskerom:  motion_detected:  light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.579122 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.578011 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.576866 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.575801 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:09.574609 INFO bad_2_etasje:  motion_detected:  light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.569463 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.568324 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.567139 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.566035 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:09.564759 INFO bad_1_etasje:  motion_detected:  light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.558752 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.557534 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.556282 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.555224 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:09.554039 INFO gang_2_etasje:  motion_detected:  light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.549667 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.548623 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.547503 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.546480 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:09.545261 INFO gang_1_etasje_bordlampe:  motion_detected:  light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.539527 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.538448 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.537350 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.536325 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:09.535132 INFO gang_1_etasje:  motion_detected:  light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.530605 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.529340 INFO spisestue:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.528216 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.527169 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:09.526006 INFO spisestue:  motion_detected:  light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.521347 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.520226 INFO kjokken:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.519078 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.517987 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:09.516310 INFO kjokken:  motion_detected:  light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.511899 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.510759 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.509643 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.508573 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.507396 INFO trapp:  motion_detected: light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.502710 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.501653 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.spisestue_taklampe_spisestue_dimmer' \| self.dimming = False
2022-01-08  09:53:09.500576 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.499580 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.498414 INFO trapp:  motion_detected: light.spisestue_taklampe_spisestue_dimmer changed state from off to on
2022-01-08 09:53:09.498275 INFO trapp: Previous message repeated 1 times
2022-01-08  09:53:09.485248 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.452191 INFO AppDaemon: Previous message repeated 1 times
2022-01-08 09:53:09.382148 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.381001 INFO vaskerom:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.379690 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.378663 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.377565 INFO vaskerom:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.373568 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.372498 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.371409 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.370343 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.369161 INFO bad_2_etasje:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.363342 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.362160 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.361035 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.359761 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.358609 INFO bad_1_etasje:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.354642 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.353571 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.352290 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.351226 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.350053 INFO gang_2_etasje:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.345689 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.344625 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.343542 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.342526 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.341380 INFO gang_1_etasje_bordlampe:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.336673 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.335555 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.334424 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.333373 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.332185 INFO gang_1_etasje:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.328001 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.326910 INFO spisestue:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.325519 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.324436 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.323242 INFO spisestue:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.318706 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.317613 INFO kjokken:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.316525 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.315514 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.313724 INFO kjokken:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.307687 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.306516 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.305350 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.304178 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.302951 INFO trapp:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.297498 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:09.295528 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklampe_spisestue' \|  self.dimming = False
2022-01-08  09:53:09.292891 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:09.290935 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:09.289366 INFO trapp:  motion_detected: light.taklampe_spisestue changed state from off to on
2022-01-08 09:53:09.289179 INFO trapp: Previous message repeated 1 times
2022-01-08  09:53:09.249778 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.243083 INFO bad_1_etasje:  motion_event: light in Bad_1_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.236134 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.196054 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.156339 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.148014 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.141298 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.133821 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.117988 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:09.117788 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:09.059754 INFO AppDaemon: Previous message repeated 1 times
2022-01-08  09:53:09.014059 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:09.006176 INFO bad_1_etasje:  motion_event: light in Bad_1_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:08.997904 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:08.949359 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.947430 INFO vaskerom:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.945428 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.943449 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.941229 INFO vaskerom:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.935358 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.933603 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.931445 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.929476 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.928183 INFO bad_2_etasje:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.924159 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.923050 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.921937 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.920901 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.919726 INFO bad_1_etasje:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.914669 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.913554 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.912466 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.911431 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.910253 INFO gang_2_etasje:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.905770 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.904509 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.903412 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.902389 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.901199 INFO gang_1_etasje_bordlampe:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.896608 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.895494 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.894375 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.893356 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.892195 INFO gang_1_etasje:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.888305 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.887209 INFO spisestue:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.886106 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.885057 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.883879 INFO spisestue:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.879482 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.878398 INFO kjokken:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.877312 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.876270 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.875125 INFO kjokken:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.870524 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.869445 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.868318 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.867273 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.866114 INFO trapp:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.861712 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.860635 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.859574 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.858533 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.857362 INFO trapp:  motion_detected: light.taklys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.857210 INFO trapp: Previous message repeated 1 times
2022-01-08  09:53:08.835362 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:08.778886 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:08.771599 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:08.764126 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:08.756466 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:08.740330 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:08.740146 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:08.684818 INFO AppDaemon: Previous message repeated 1 times
2022-01-08  09:53:08.662574 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:08.655467 INFO bad_1_etasje:  motion_event: light in Bad_1_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:08.647715 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:08.575865 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.574690 INFO vaskerom:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.573531 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.572450 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:08.571022 INFO vaskerom:  motion_detected:  light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.566595 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.565459 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.564302 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.563228 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:08.562019 INFO bad_2_etasje:  motion_detected:  light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.557721 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.556577 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.555404 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.554338 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:08.553128 INFO bad_1_etasje:  motion_detected:  light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.548605 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.547418 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.546203 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.544856 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:08.543522 INFO gang_2_etasje:  motion_detected:  light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.538696 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.537508 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.536293 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.535156 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:08.533867 INFO gang_1_etasje_bordlampe:  motion_detected:  light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.528796 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.527649 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.526450 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.525276 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:08.523784 INFO gang_1_etasje:  motion_detected:  light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.490084 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.488879 INFO spisestue:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.487759 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.486716 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:08.485538 INFO spisestue:  motion_detected:  light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.481009 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.479680 INFO kjokken:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.478389 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.477115 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:53:08.475767 INFO kjokken:  motion_detected:  light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.471422 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.470090 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.468826 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.466899 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.463276 INFO trapp:  motion_detected: light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.457736 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.456624 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.bad_1_etasje_taklys_bad_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:53:08.455503 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.454445 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.453260 INFO trapp:  motion_detected: light.bad_1_etasje_taklys_bad_1_etg_dimmer changed state from off to on
2022-01-08 09:53:08.453091 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:08.372929 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:08.362775 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:08.355160 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:53:08.347715 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:08.332962 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:53:08.332794 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:08.300681 INFO AppDaemon: Previous message repeated 1 times
2022-01-08 09:53:08.241127 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.239992 INFO vaskerom:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.238823 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.237831 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.236719 INFO vaskerom:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.231970 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.230789 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.229663 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.228670 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.227487 INFO bad_2_etasje:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.223089 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.221660 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.220532 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.219445 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.218232 INFO bad_1_etasje:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.212372 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.211113 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.209901 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.208765 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.207522 INFO gang_2_etasje:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.201951 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.200696 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.199214 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.197355 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.195499 INFO gang_1_etasje_bordlampe:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.190617 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.188894 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.186534 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.184510 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.182865 INFO gang_1_etasje:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.176907 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.175777 INFO spisestue:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.174384 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.173360 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.172170 INFO spisestue:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.166524 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.164810 INFO kjokken:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.163542 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.162492 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.161254 INFO kjokken:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.155435 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.151100 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.149322 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.147646 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.145736 INFO trapp:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.139007 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:53:08.137350 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_1_etg' \|  self.dimming = False
2022-01-08  09:53:08.135304 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:53:08.133364 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:53:08.131556 INFO trapp:  motion_detected: light.speillys_bad_1_etg changed state from off to on
2022-01-08 09:53:08.131262 INFO trapp: Previous message repeated 1 times
2022-01-08 09:53:08.126564 INFO AppDaemon: Previous message repeated 200 times
2022-01-08  09:52:57.006708 WARNING AppDaemon: Excessive time spent in utility  loop: 2648.0ms, 2644.0ms in check_app_updates(), 4.0ms in other
2022-01-08  09:52:56.842095 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:56.837687 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:56.814442 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:56.801817 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:56.794172 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:56.767413 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:56.765299 INFO bad_1_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:56.763983 INFO bad_1_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08 09:52:56.763817 INFO bad_1_etasje: Previous message repeated 1 times
2022-01-08 09:52:56.756067 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:56.735706 INFO bad_1_etasje: Previous message repeated 1 times
2022-01-08  09:52:56.719557 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:56.680496 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:56.673474 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:56.666769 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:56.659444 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:56.641743 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:56.641581 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:56.600261 INFO AppDaemon: Previous message repeated 1 times
2022-01-08  09:52:56.584106 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:56.582554 INFO bad_1_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:56.580861 INFO bad_1_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08 09:52:56.573505 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:56.512490 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.511375 INFO vaskerom:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.510089 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.509011 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:56.507827 INFO vaskerom:  motion_detected:  light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.503286 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.501637 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.499554 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.497584 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:56.495360 INFO bad_2_etasje:  motion_detected:  light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.490303 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.489070 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.487966 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.486969 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:56.485810 INFO bad_1_etasje:  motion_detected:  light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.481695 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.480639 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.479504 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.478484 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:56.477228 INFO gang_2_etasje:  motion_detected:  light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.471044 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.469799 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.468371 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.466325 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:56.464492 INFO gang_1_etasje_bordlampe:  motion_detected:  light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.459754 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.458017 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.456033 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.454352 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:56.452597 INFO gang_1_etasje:  motion_detected:  light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.446820 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.444987 INFO spisestue:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.443005 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.441181 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:56.439228 INFO spisestue:  motion_detected:  light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.433081 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.431158 INFO kjokken:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.429370 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.427679 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:56.425779 INFO kjokken:  motion_detected:  light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.419484 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.417659 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.415858 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.413945 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.411729 INFO trapp:  motion_detected: light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.406034 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.404312 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_taklys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:56.402577 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.400808 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.398763 INFO trapp:  motion_detected: light.bad_2_etasje_taklys_bad_2_etg_dimmer changed state from off to on
2022-01-08 09:52:56.398547 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:56.316894 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:56.307043 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:56.299396 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:56.293106 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:56.279158 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:56.278971 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:56.245175 INFO AppDaemon: Previous message repeated 1 times
2022-01-08 09:52:56.185809 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.184468 INFO vaskerom:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.182681 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.181581 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.180344 INFO vaskerom:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.175276 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.173959 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.172790 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.171795 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.170665 INFO bad_2_etasje:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.166253 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.164599 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.163426 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.162376 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.161194 INFO bad_1_etasje:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.156755 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.155624 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.154446 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.153270 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.151920 INFO gang_2_etasje:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.146924 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.145675 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.144192 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.142287 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.140582 INFO gang_1_etasje_bordlampe:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.136497 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.135435 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.134354 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.133294 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.132079 INFO gang_1_etasje:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.127107 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.125989 INFO spisestue:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.124863 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.123862 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.122613 INFO spisestue:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.118275 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.117169 INFO kjokken:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.116028 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.115009 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.113814 INFO kjokken:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.109426 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.108247 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.107120 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.106067 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.104901 INFO trapp:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.099927 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:56.098804 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:56.097669 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:56.096634 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:56.095477 INFO trapp:  motion_detected: light.taklys_bad_2_etg changed state from off to on
2022-01-08 09:52:56.095347 INFO trapp: Previous message repeated 1 times
2022-01-08  09:52:56.056825 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:56.052097 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:56.019743 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:56.003812 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.995929 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:55.958431 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.957010 INFO bad_1_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:55.955778 INFO bad_1_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08 09:52:55.955621 INFO bad_1_etasje: Previous message repeated 1 times
2022-01-08 09:52:55.947203 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:55.917456 INFO bad_1_etasje: Previous message repeated 1 times
2022-01-08  09:52:55.898851 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:55.861204 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.853099 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.846692 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.840406 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:55.826094 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:55.825872 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:55.776143 INFO AppDaemon: Previous message repeated 1 times
2022-01-08  09:52:55.751383 INFO bad_2_etasje:  motion_event: light in Bad_2_etasje  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.749870 INFO bad_1_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:55.748722 INFO bad_1_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08 09:52:55.741540 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:55.664298 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.663198 INFO vaskerom:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.662062 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.661005 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.659826 INFO vaskerom:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.655233 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.653577 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.651385 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.649342 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.647170 INFO bad_2_etasje:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.642108 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.640467 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.638533 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.636534 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.634297 INFO bad_1_etasje:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.629063 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.627984 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.626834 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.625785 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.624650 INFO gang_2_etasje:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.620553 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.619184 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.618044 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.616912 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.615606 INFO gang_1_etasje_bordlampe:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.611148 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.610026 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.608886 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.607795 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.606588 INFO gang_1_etasje:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.602114 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.600947 INFO spisestue:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.599762 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.598630 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.597114 INFO spisestue:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.591301 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.588412 INFO kjokken:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.586691 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.585571 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.584386 INFO kjokken:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.580376 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.579319 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.578166 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.576748 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.575064 INFO trapp:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.571042 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.569916 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.bad_2_etasje_speillys_bad_2_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:55.568757 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.567690 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:55.566502 INFO trapp:  motion_detected:  light.bad_2_etasje_speillys_bad_2_etg_dimmer changed state from off to  on
2022-01-08 09:52:55.566358 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:55.490855 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.483802 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.477771 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.470102 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:55.453630 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:55.453434 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:55.414909 INFO AppDaemon: Previous message repeated 1 times
2022-01-08 09:52:55.350625 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.348874 INFO vaskerom:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.347570 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.346356 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.344762 INFO vaskerom:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.340779 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.339731 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.338673 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.337685 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.336584 INFO bad_2_etasje:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.332497 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.331411 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.330297 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.329248 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.328019 INFO bad_1_etasje:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.323568 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.322494 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.321418 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.320358 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.318980 INFO gang_2_etasje:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.314654 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.313568 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.312069 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.310119 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.308784 INFO gang_1_etasje_bordlampe:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.304820 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.303730 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.302517 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.300532 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.298258 INFO gang_1_etasje:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.290072 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.287540 INFO spisestue:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.285448 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.284129 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.282623 INFO spisestue:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.278475 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.277408 INFO kjokken:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.276231 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.275153 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.273980 INFO kjokken:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.269234 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.268127 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.267009 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.265958 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.264792 INFO trapp:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.260896 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:55.259778 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.speillys_bad_2_etg' \|  self.dimming = False
2022-01-08  09:52:55.258678 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:55.257670 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:55.255957 INFO trapp:  motion_detected: light.speillys_bad_2_etg changed state from off to on
2022-01-08 09:52:55.255795 INFO trapp: Previous message repeated 1 times
2022-01-08  09:52:55.179250 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:55.170861 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:55.160742 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:55.157914 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:55.110693 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:55.103867 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:55.085796 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:55.078927 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:55.077353 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:55.054180 INFO bad_2_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:55.052981 INFO bad_2_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08 09:52:55.052827 INFO bad_2_etasje: Previous message repeated 1 times
2022-01-08  09:52:55.050995 INFO bad_1_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:55.049204 INFO bad_1_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08 09:52:55.048986 INFO bad_1_etasje: Previous message repeated 1 times
2022-01-08 09:52:55.037466 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:55.005355 INFO bad_2_etasje: Previous message repeated 1 times
2022-01-08 09:52:55.004691 INFO bad_1_etasje: Previous message repeated 1 times
2022-01-08  09:52:54.986057 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.942665 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:54.932716 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:54.924138 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:54.918080 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.903402 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.903232 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:54.848090 INFO AppDaemon: Previous message repeated 1 times
2022-01-08  09:52:54.836191 INFO bad_2_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:54.834952 INFO bad_2_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08  09:52:54.833479 INFO bad_1_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:54.832276 INFO bad_1_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08 09:52:54.825957 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.761827 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.760686 INFO vaskerom:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.759464 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.758385 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.757147 INFO vaskerom:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.752797 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.751269 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.749123 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.748061 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.746896 INFO bad_2_etasje:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.742699 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.740534 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.739170 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.738001 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.736812 INFO bad_1_etasje:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.732169 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.731060 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.729911 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.728832 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.727748 INFO gang_2_etasje:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.723754 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.722693 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.721597 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.720538 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.719374 INFO gang_1_etasje_bordlampe:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.715070 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.713957 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.712828 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.711775 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.710530 INFO gang_1_etasje:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.705975 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.704838 INFO spisestue:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.703674 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.702640 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.701496 INFO spisestue:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.697699 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.696588 INFO kjokken:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.695497 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.694495 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.693413 INFO kjokken:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.689404 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.688338 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.687225 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.686174 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.685022 INFO trapp:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.681212 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.680084 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.gang_2_etasje_taklys_gang_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:54.678970 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.677925 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:54.676814 INFO trapp:  motion_detected:  light.gang_2_etasje_taklys_gang_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:54.676685 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:54.610329 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:54.600404 INFO gang_2_etasje:  motion_event: light in  Gang_2_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:54.591391 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:54.583589 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.569503 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.569330 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:54.539216 INFO AppDaemon: Previous message repeated 1 times
2022-01-08 09:52:54.481050 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.479936 INFO vaskerom:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.478800 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.477565 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.476393 INFO vaskerom:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.472653 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.471600 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.470523 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.469492 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.468350 INFO bad_2_etasje:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.464297 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.463153 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.461926 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.460061 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.458202 INFO bad_1_etasje:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.452230 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.450356 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.448367 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.446293 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.444093 INFO gang_2_etasje:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.438767 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.436790 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.435060 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.433697 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.432450 INFO gang_1_etasje_bordlampe:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.428290 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.427215 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.426094 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.425087 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.423971 INFO gang_1_etasje:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.419747 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.418594 INFO spisestue:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.417108 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.415581 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.413759 INFO spisestue:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.408183 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.406816 INFO kjokken:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.404996 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.403888 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.402650 INFO kjokken:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.398362 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.397133 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.395835 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.394008 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.392556 INFO trapp:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.388189 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:54.387053 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklys_gang_2_etg' \|  self.dimming = False
2022-01-08  09:52:54.385546 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:54.384531 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:54.383320 INFO trapp:  motion_detected: light.taklys_gang_2_etg changed state from off to on
2022-01-08 09:52:54.383178 INFO trapp: Previous message repeated 1 times
2022-01-08  09:52:54.335986 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:54.329449 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:54.324488 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:54.323034 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:54.292419 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:54.269831 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:54.260680 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:54.248049 INFO gang_2_etasje: πŸ’‘ Gang_2_etasje turned  on β†’ brightness: 80% \| delay: 2min
2022-01-08  09:52:54.236395 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:54.234920 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:54.229490 INFO bad_2_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:54.228281 INFO bad_2_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08  09:52:54.226824 INFO bad_1_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:54.225709 INFO bad_1_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08 09:52:54.219177 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.217570 INFO bad_2_etasje: Previous message repeated 1 times
2022-01-08 09:52:54.217129 INFO bad_1_etasje: Previous message repeated 1 times
2022-01-08 09:52:54.170025 INFO bad_2_etasje: Previous message repeated 1 times
2022-01-08 09:52:54.169569 INFO bad_1_etasje: Previous message repeated 1 times
2022-01-08 09:52:54.158828 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:54.156592 INFO gang_2_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:54.155297 INFO gang_2_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08  09:52:54.146287 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:54.136697 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.123247 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.123074 INFO trapp: Previous message repeated 1 times
2022-01-08  09:52:54.087682 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:54.070396 INFO AppDaemon: Previous message repeated 1 times
2022-01-08  09:52:54.002111 INFO gang_2_etasje: πŸ’‘ Gang_2_etasje turned  on β†’ brightness: 80% \| delay: 2min
2022-01-08 09:52:53.989648 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.988592 INFO vaskerom:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.987458 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.986436 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.984997 INFO vaskerom:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.980743 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.979666 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.978122 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.976293 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.974226 INFO bad_2_etasje:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.968122 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.966144 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.964118 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.962158 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.959880 INFO bad_1_etasje:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.953702 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.951722 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.949704 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.947694 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.945160 INFO gang_2_etasje:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.938483 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.936727 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.935554 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.934424 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.933220 INFO gang_1_etasje_bordlampe:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.928834 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.927690 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.926534 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.925446 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.924186 INFO gang_1_etasje:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.919737 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.918579 INFO spisestue:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.917396 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.916268 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.914298 INFO spisestue:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.908291 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.906146 INFO kjokken:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.903970 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.901909 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.899686 INFO kjokken:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.895228 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.893928 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.891929 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.890826 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.889606 INFO trapp:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.884063 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.882917 INFO trapp:  motion_event: received  'state_changed_detection' event from  'light.stue_1_etasje_taklampe_stue_1_etg_dimmer' \| self.dimming = False
2022-01-08  09:52:53.881752 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.880079 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.878881 INFO trapp:  motion_detected:  light.stue_1_etasje_taklampe_stue_1_etg_dimmer changed state from off to  on
2022-01-08 09:52:53.878707 INFO trapp: Previous message repeated 1 times
2022-01-08  09:52:53.841604 INFO bad_2_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:53.840391 INFO bad_2_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08  09:52:53.838898 INFO bad_1_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:53.837523 INFO bad_1_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08 09:52:53.830059 INFO kjokken:  motion_event: light in Kitchen already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:53.757222 INFO vaskerom:  motion_event: light in Vaskerom already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:53.755295 INFO gang_2_etasje:  lights_on:  self.thresholds.get(EntityType.ILLUMINANCE.idx) = None \| self.dimming =  False \| force = False \| bool(force or self.dimming) = False
2022-01-08 09:52:53.753941 INFO gang_2_etasje:  motion_event: switching on \| self.dimming = False
2022-01-08  09:52:53.746377 INFO gang_1_etasje_bordlampe:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:53.739897 INFO gang_1_etasje:  motion_event: light in  Gang_1_etasje already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:53.725551 INFO trapp:  motion_event: light in Trapp already on β†’ refreshing timer \| self.dimming = False
2022-01-08 09:52:53.725380 INFO trapp: Previous message repeated 1 times
2022-01-08 09:52:53.694371 INFO AppDaemon: Previous message repeated 1 times
2022-01-08 09:52:53.626194 INFO vaskerom:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.625110 INFO vaskerom:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.623815 INFO vaskerom:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.622823 INFO vaskerom:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:53.621708 INFO vaskerom:  motion_detected: light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.617383 INFO bad_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.616267 INFO bad_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.615146 INFO bad_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.614110 INFO bad_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:53.612955 INFO bad_2_etasje:  motion_detected: light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.608807 INFO bad_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.607753 INFO bad_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.606669 INFO bad_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.605667 INFO bad_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:53.604554 INFO bad_1_etasje:  motion_detected: light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.600327 INFO gang_2_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.599225 INFO gang_2_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.597854 INFO gang_2_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.596795 INFO gang_2_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:53.595609 INFO gang_2_etasje:  motion_detected: light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.591546 INFO gang_1_etasje_bordlampe:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.590465 INFO gang_1_etasje_bordlampe:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.589362 INFO gang_1_etasje_bordlampe:  motion_detected: handles  cleared and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.588298 INFO gang_1_etasje_bordlampe:  clear_handles: cancelled scheduled callbacks
2022-01-08  09:52:53.587151 INFO gang_1_etasje_bordlampe:  motion_detected:  light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.582976 INFO gang_1_etasje:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.581846 INFO gang_1_etasje:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.580721 INFO gang_1_etasje:  motion_detected: handles cleared  and cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.579663 INFO gang_1_etasje:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:53.578511 INFO gang_1_etasje:  motion_detected: light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.574442 INFO spisestue:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.573262 INFO spisestue:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.571848 INFO spisestue:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.570722 INFO spisestue:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:53.569472 INFO spisestue:  motion_detected: light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.564727 INFO kjokken:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.563424 INFO kjokken:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.562072 INFO kjokken:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.560819 INFO kjokken:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:53.559353 INFO kjokken:  motion_detected: light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.554218 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.552481 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.549738 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.547892 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:53.546205 INFO trapp:  motion_detected: light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.539877 INFO trapp:  motion_event: await self.is_disabled() = False \| self.dimming = False
2022-01-08  09:52:53.537569 INFO trapp:  motion_event: received  'state_changed_detection' event from 'light.taklampe_stue_1_etg'  \| self.dimming = False
2022-01-08  09:52:53.535711 INFO trapp:  motion_detected: handles cleared and  cancelled all scheduled timers \| self.dimming = False
2022-01-08 09:52:53.533987 INFO trapp:  clear_handles: cancelled scheduled callbacks
2022-01-08 09:52:53.532172 INFO trapp:  motion_detected: light.taklampe_stue_1_etg changed state from off to on
2022-01-08 09:52:53.531943 INFO trapp: Previous message repeated 1 times
2022-01-08  09:52:53.267417 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:53.260680 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:53.254241 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:53.251767 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:53.211341 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:53.203123 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:53.177355 INFO spisestue:  motion_event: light in Spisestue  already on β†’ refreshing timer \| self.dimming = False
2022-01-08  09:52:53.165179 INFO bad_2_etasje: πŸ’‘ Bad_2_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:53.162352 INFO bad_1_etasje: πŸ’‘ Bad_1_etasje turned  on β†’ brightness: 95% \| delay: 5min
2022-01-08  09:52:53.141726 INFO gang_2_etasje: πŸ’‘ Gang_2_etasje turned  on β†’ brightness: 80% \| delay: 2min

🧁 Additional context Starts working immediately if I roll back to AppDaemon 0.7.2

Allthebester commented 2 years ago

I've also got this issue now, silly that such an update would render my motion activated lights a seemingly random mess.

gogui63 commented 2 years ago

Same as @henrikeri , rollback to AppDeamon 0.7.2

cokeman0 commented 2 years ago

Same here...

ChrisHaPunkt commented 2 years ago

Looks like there are motion events received for entities that are not defined in app-config. Within my setup, the kitchen dish cleaner switch triggers now the living room motion.

livingroom: motion_event: received 'state_changed_detection' event from 'switch.kueche_steckdose_geschirrspuler' | self.dimming = False

clipse2004 commented 2 years ago

ah great just wanted to report a bug too ;) Same problem, on movement each room is triggered. BTW the same applies to Notifreeze :/

chbndrhnns commented 2 years ago

It might be related with https://community.home-assistant.io/t/announcement-appdaemon-4-2-0/374763

mendevi commented 2 years ago

Same here, Automoli is rendered a mess and expected functionality ceases (after upgrade of AppDaemon to version 4.2.0 -- stand alone docker image -- ). Roll-back to AppDaemon v4.1.0 returns Automoli to the amazing program it is.

Edit: Referenced stand alone docker image instead of hassio add-on.

Allthebester commented 2 years ago

It might be related with https://community.home-assistant.io/t/announcement-appdaemon-4-2-0/374763

Thanks for the link, seems to be a very simple fix, just searched for "set_state" and "listen_state" then replaced "entity" with "entity_id" Code attached below. I have only done a few short tests so it may not be a complete fix but it worked for my 2 motion activated zones.

"""AutoMoLi.
   Automatic Motion Lights
  @benleb / https://github.com/benleb/ad-automoli
"""

from __future__ import annotations

import asyncio
from collections.abc import Coroutine, Iterable
from copy import deepcopy
from datetime import time
from distutils.version import StrictVersion
from enum import Enum, IntEnum
from inspect import stack
import logging
from pprint import pformat
import random
from typing import Any

# pylint: disable=import-error
import hassapi as hass

__version__ = "0.11.2"

APP_NAME = "AutoMoLi"
APP_ICON = "πŸ’‘"

ON_ICON = APP_ICON
OFF_ICON = "πŸŒ‘"
DIM_ICON = "πŸ”œ"
DAYTIME_SWITCH_ICON = "⏰"

# default values
DEFAULT_NAME = "daytime"
DEFAULT_LIGHT_SETTING = 100
DEFAULT_DELAY = 150
DEFAULT_DIM_METHOD = "step"
DEFAULT_DAYTIMES: list[dict[str, str | int]] = [
    dict(starttime="05:30", name="morning", light=25),
    dict(starttime="07:30", name="day", light=100),
    dict(starttime="20:30", name="evening", light=90),
    dict(starttime="22:30", name="night", light=0),
]
DEFAULT_LOGLEVEL = "INFO"

EVENT_MOTION_XIAOMI = "xiaomi_aqara.motion"

RANDOMIZE_SEC = 5
SECONDS_PER_MIN: int = 60

class EntityType(Enum):
    LIGHT = "light."
    MOTION = "binary_sensor.motion_sensor_"
    HUMIDITY = "sensor.humidity_"
    ILLUMINANCE = "sensor.illumination_"
    DOOR_WINDOW = "binary_sensor.door_window_sensor_"

    @property
    def idx(self) -> str:
        return self.name.casefold()

    @property
    def prefix(self) -> str:
        return str(self.value).casefold()

SENSORS_REQUIRED = [EntityType.MOTION.idx]
SENSORS_OPTIONAL = [EntityType.HUMIDITY.idx, EntityType.ILLUMINANCE.idx]

KEYWORDS = {
    EntityType.LIGHT.idx: "light.",
    EntityType.MOTION.idx: "binary_sensor.motion_sensor_",
    EntityType.HUMIDITY.idx: "sensor.humidity_",
    EntityType.ILLUMINANCE.idx: "sensor.illumination_",
    EntityType.DOOR_WINDOW.idx: "binary_sensor.door_window_sensor_",
}

def install_pip_package(
    pkg: str,
    version: str = "",
    install_name: str | None = None,
    pre_release: bool = False,
) -> None:
    import importlib
    import site
    from subprocess import check_call  # nosec
    import sys

    try:
        importlib.import_module(pkg)
    except ImportError:
        install_name = install_name if install_name else pkg
        if pre_release:
            check_call(
                [
                    sys.executable,
                    "-m",
                    "pip",
                    "install",
                    "--upgrade",
                    "--pre",
                    f"{install_name}{version}",
                ]
            )
        else:
            check_call(
                [
                    sys.executable,
                    "-m",
                    "pip",
                    "install",
                    "--upgrade",
                    f"{install_name}{version}",
                ]
            )
        importlib.reload(site)
    finally:
        importlib.import_module(pkg)

# install adutils library
install_pip_package("adutils", version=">=0.6.2")
from adutils import Room, hl, natural_time, py38_or_higher, py39_or_higher  # noqa
from adutils import py37_or_higher  # noqa

class DimMethod(IntEnum):
    """IntEnum representing the transition-to-off method used."""

    NONE = 0
    TRANSITION = 1
    STEP = 2

class AutoMoLi(hass.Hass):  # type: ignore
    """Automatic Motion Lights."""

    def lg(
        self,
        msg: str,
        *args: Any,
        level: int | None = None,
        icon: str | None = None,
        repeat: int = 1,
        log_to_ha: bool = False,
        **kwargs: Any,
    ) -> None:
        kwargs.setdefault("ascii_encode", False)

        level = level if level else self.loglevel

        if level >= self.loglevel:
            message = f"{f'{icon} ' if icon else ' '}{msg}"
            _ = [self.log(message, *args, **kwargs) for _ in range(repeat)]

            if log_to_ha or self.log_to_ha:
                message = message.replace("\033[1m", "").replace("\033[0m", "")

                # Python community recommend a strategy of
                # "easier to ask for forgiveness than permission"
                # https://stackoverflow.com/a/610923/13180763
                try:
                    ha_name = self.room.name.capitalize()
                except AttributeError:
                    ha_name = APP_NAME
                    self.lg(
                        "No room set yet, using 'AutoMoLi' forlogging to HA",
                        level=logging.DEBUG,
                    )

                self.call_service(
                    "logbook/log",
                    name=ha_name,  # type:ignore
                    message=message,  # type:ignore
                    entity_id="light.esszimmer_decke",  # type:ignore
                )

    def listr(
        self,
        list_or_string: list[str] | set[str] | str | Any,
        entities_exist: bool = True,
    ) -> set[str]:
        entity_list: list[str] = []

        if isinstance(list_or_string, str):
            entity_list.append(list_or_string)
        elif isinstance(list_or_string, list) or isinstance(list_or_string, set):
            entity_list += list_or_string
        elif list_or_string:
            self.lg(
                f"{list_or_string} is of type {type(list_or_string)} and "
                f"not 'Union[List[str], Set[str], str]'"
            )

        return set(
            filter(self.entity_exists, entity_list) if entities_exist else entity_list
        )

    async def initialize(self) -> None:
        """Initialize a room with AutoMoLi."""

        # pylint: disable=attribute-defined-outside-init

        self.icon = APP_ICON

        # get a real dict for the configuration
        self.args: dict[str, Any] = dict(self.args)

        self.loglevel = (
            logging.DEBUG if self.args.get("debug_log", False) else logging.INFO
        )

        self.log_to_ha = self.args.get("log_to_ha", False)

        # notification thread (prevents doubled messages)
        self.notify_thread = random.randint(0, 9)  # nosec

        self.lg(
            f"setting log level to {logging.getLevelName(self.loglevel)}",
            level=logging.DEBUG,
        )

        # python version check
        if not py39_or_higher:
            self.lg("")
            self.lg(f" hey, what about trying {hl('Python >= 3.9')}β€½ πŸ€ͺ")
            self.lg("")
        if not py38_or_higher:
            icon_alert = "⚠️"
            self.lg("", icon=icon_alert)
            self.lg("")
            self.lg(
                f" please update to {hl('Python >= 3.8')} at least! πŸ€ͺ", icon=icon_alert
            )
            self.lg("")
            self.lg("", icon=icon_alert)
        if not py37_or_higher:
            raise ValueError

        # set room
        self.room_name = str(self.args.pop("room"))

        # general delay
        self.delay = int(self.args.pop("delay", DEFAULT_DELAY))

        # directly switch to new daytime light settings
        self.transition_on_daytime_switch: bool = bool(
            self.args.pop("transition_on_daytime_switch", False)
        )

        # state values
        self.states = {
            "motion_on": self.args.pop("motion_state_on", None),
            "motion_off": self.args.pop("motion_state_off", None),
        }

        # threshold values
        self.thresholds = {
            "humidity": self.args.pop("humidity_threshold", None),
            EntityType.ILLUMINANCE.idx: self.args.pop("illuminance_threshold", None),
        }

        # experimental dimming features
        self.dimming: bool = False
        self.dim: dict[str, int | DimMethod] = {}
        if (dim := self.args.pop("dim", {})) and (
            seconds_before := dim.pop("seconds_before", None)
        ):

            brightness_step_pct = dim.pop("brightness_step_pct", None)

            dim_method: DimMethod | None = None
            if method := dim.pop("method", None):
                dim_method = (
                    DimMethod.TRANSITION
                    if method.lower() == "transition"
                    else DimMethod.STEP
                )
            elif brightness_step_pct:
                dim_method = DimMethod.TRANSITION
            else:
                dim_method = DimMethod.NONE

            self.dim = {  # type: ignore
                "brightness_step_pct": brightness_step_pct,
                "seconds_before": int(seconds_before),
                "method": dim_method.value,
            }

        # night mode settings
        self.night_mode: dict[str, int | str] = {}
        if night_mode := self.args.pop("night_mode", {}):
            self.night_mode = await self.configure_night_mode(night_mode)

        # on/off switch via input.boolean
        self.disable_switch_entities: set[str] = self.listr(
            self.args.pop("disable_switch_entities", set())
        )
        self.disable_switch_states: set[str] = self.listr(
            self.args.pop("disable_switch_states", set(["off"]))
        )

        # store if an entity has been switched on by automoli
        self.only_own_events: bool = bool(self.args.pop("only_own_events", False))
        self._switched_on_by_automoli: set[str] = set()

        self.disable_hue_groups: bool = self.args.pop("disable_hue_groups", False)

        # eol of the old option name
        if "disable_switch_entity" in self.args:
            icon_alert = "⚠️"
            self.lg("", icon=icon_alert)
            self.lg(
                f" please migrate {hl('disable_switch_entity')} to {hl('disable_switch_entities')}",
                icon=icon_alert,
            )
            self.lg("", icon=icon_alert)
            self.args.pop("disable_switch_entity")
            return

        # currently active daytime settings
        self.active: dict[str, int | str] = {}

        # entity lists for initial discovery
        states = await self.get_state()

        self.handle_turned_off: str | None = None

        # define light entities switched by automoli
        self.lights: set[str] = self.args.pop("lights", set())
        if not self.lights:
            room_light_group = f"light.{self.room_name}"
            if await self.entity_exists(room_light_group):
                self.lights.add(room_light_group)
            else:
                self.lights.update(
                    await self.find_sensors(
                        EntityType.LIGHT.prefix, self.room_name, states
                    )
                )

        # sensors
        self.sensors: dict[str, Any] = {}

        # enumerate sensors for motion detection
        self.sensors[EntityType.MOTION.idx] = self.listr(
            self.args.pop(
                "motion",
                await self.find_sensors(
                    EntityType.MOTION.prefix, self.room_name, states
                ),
            )
        )

        self.room = Room(
            name=self.room_name,
            room_lights=self.lights,
            motion=self.sensors[EntityType.MOTION.idx],
            door_window=set(),
            temperature=set(),
            push_data=dict(),
            appdaemon=self.get_ad_api(),
        )

        # requirements check
        if not self.lights or not self.sensors[EntityType.MOTION.idx]:
            self.lg("")
            self.lg(
                f"{hl('No lights/sensors')} given and none found with name: "
                f"'{hl(EntityType.LIGHT.prefix)}*{hl(self.room.name)}*' or "
                f"'{hl(EntityType.MOTION.prefix)}*{hl(self.room.name)}*'",
                icon="⚠️ ",
            )
            self.lg("")
            self.lg("  docs: https://github.com/benleb/ad-automoli")
            self.lg("")
            return

        # enumerate optional sensors & disable optional features if sensors are not available
        for sensor_type in SENSORS_OPTIONAL:

            if sensor_type in self.thresholds and self.thresholds[sensor_type]:
                self.sensors[sensor_type] = self.listr(
                    self.args.pop(sensor_type, None)
                ) or await self.find_sensors(
                    KEYWORDS[sensor_type], self.room_name, states
                )

                self.lg(f"{self.sensors[sensor_type] = }", level=logging.DEBUG)

            else:
                self.lg(
                    f"No {sensor_type} sensors β†’ disabling features based on {sensor_type}"
                    f" - {self.thresholds[sensor_type]}.",
                    level=logging.DEBUG,
                )
                del self.thresholds[sensor_type]

        # use user-defined daytimes if available
        daytimes = await self.build_daytimes(
            self.args.pop("daytimes", DEFAULT_DAYTIMES)
        )

        # set up event listener for each sensor
        listener: set[Coroutine[Any, Any, Any]] = set()
        for sensor in self.sensors[EntityType.MOTION.idx]:

            # listen to xiaomi sensors by default
            if not any([self.states["motion_on"], self.states["motion_off"]]):
                self.lg(
                    "no motion states configured - using event listener",
                    level=logging.DEBUG,
                )
                listener.add(
                    self.listen_event(
                        self.motion_event, event=EVENT_MOTION_XIAOMI, entity_id=sensor
                    )
                )

            # on/off-only sensors without events on every motion
            elif all([self.states["motion_on"], self.states["motion_off"]]):
                self.lg(
                    "both motion states configured - using state listener",
                    level=logging.DEBUG,
                )
                listener.add(
                    self.listen_state(
                        self.motion_detected,
                        entity_id=sensor,
                        new=self.states["motion_on"],
                    )
                )
                listener.add(
                    self.listen_state(
                        self.motion_cleared,
                        entity_id=sensor,
                        new=self.states["motion_off"],
                    )
                )

        self.args.update(
            {
                "room": self.room_name.capitalize(),
                "delay": self.delay,
                "active_daytime": self.active_daytime,
                "daytimes": daytimes,
                "lights": self.lights,
                "dim": self.dim,
                "sensors": self.sensors,
                "disable_hue_groups": self.disable_hue_groups,
                "only_own_events": self.only_own_events,
                "loglevel": self.loglevel,
            }
        )

        if self.thresholds:
            self.args.update({"thresholds": self.thresholds})

        # add night mode to config if enabled
        if self.night_mode:
            self.args.update({"night_mode": self.night_mode})

        # add disable entity to config if given
        if self.disable_switch_entities:
            self.args.update({"disable_switch_entities": self.disable_switch_entities})
            self.args.update({"disable_switch_states": self.disable_switch_states})

        # show parsed config
        self.show_info(self.args)

        await asyncio.gather(*listener)
        await self.refresh_timer()

    async def switch_daytime(self, kwargs: dict[str, Any]) -> None:
        """Set new light settings according to daytime."""

        daytime = kwargs.get("daytime")

        if daytime is not None:
            self.active = daytime
            if not kwargs.get("initial"):

                delay = daytime["delay"]
                light_setting = daytime["light_setting"]
                if isinstance(light_setting, str):
                    is_scene = True
                    # if its a ha scene, remove the "scene." part
                    if "." in light_setting:
                        light_setting = (light_setting.split("."))[1]
                else:
                    is_scene = False

                self.lg(
                    f"{stack()[0][3]}: {self.transition_on_daytime_switch = }",
                    level=logging.DEBUG,
                )

                action_done = "set"

                if self.transition_on_daytime_switch and any(
                    [await self.get_state(light) == "on" for light in self.lights]
                ):
                    await self.lights_on(force=True)
                    action_done = "activated"

                self.lg(
                    f"{action_done} daytime {hl(daytime['daytime'])} β†’ "
                    f"{'scene' if is_scene else 'brightness'}: {hl(light_setting)}"
                    f"{'' if is_scene else '%'}, delay: {hl(natural_time(delay))}",
                    icon=DAYTIME_SWITCH_ICON,
                )

    async def motion_cleared(
        self, entity: str, attribute: str, old: str, new: str, _: dict[str, Any]
    ) -> None:
        """wrapper for motion sensors that do not push a certain event but.
        instead the default HA `state_changed` event is used for presence detection
        schedules the callback to switch the lights off after a `state_changed` callback
        of a motion sensors changing to "cleared" is received
        """

        # starte the timer if motion is cleared
        self.lg(
            f"{stack()[0][3]}: {entity} changed {attribute} from {old} to {new}",
            level=logging.DEBUG,
        )

        if all(
            [
                await self.get_state(sensor) == self.states["motion_off"]
                for sensor in self.sensors[EntityType.MOTION.idx]
            ]
        ):
            # all motion sensors off, starting timer
            await self.refresh_timer()
        else:
            # cancel scheduled callbacks
            await self.clear_handles()

    async def motion_detected(
        self, entity: str, attribute: str, old: str, new: str, kwargs: dict[str, Any]
    ) -> None:
        """wrapper for motion sensors that do not push a certain event but.
        instead the default HA `state_changed` event is used for presence detection
        maps the `state_changed` callback of a motion sensors changing to "detected"
        to the `event` callback`
        """

        self.lg(
            f"{stack()[0][3]}: {entity} changed {attribute} from {old} to {new}",
            level=logging.DEBUG,
        )

        # cancel scheduled callbacks
        await self.clear_handles()

        self.lg(
            f"{stack()[0][3]}: handles cleared and cancelled all scheduled timers"
            f" | {self.dimming = }",
            level=logging.DEBUG,
        )

        # calling motion event handler
        data: dict[str, Any] = {"entity_id": entity, "new": new, "old": old}
        await self.motion_event("state_changed_detection", data, kwargs)

    async def motion_event(
        self, event: str, data: dict[str, str], _: dict[str, Any]
    ) -> None:
        """Main handler for motion events."""

        self.lg(
            f"{stack()[0][3]}: received '{hl(event)}' event from "
            f"'{data['entity_id'].replace(EntityType.MOTION.prefix, '')}' | {self.dimming = }",
            level=logging.DEBUG,
        )

        # check if automoli is disabled via home assistant entity
        self.lg(
            f"{stack()[0][3]}: {await self.is_disabled() = } | {self.dimming = }",
            level=logging.DEBUG,
        )
        if await self.is_disabled():
            return

        # turn on the lights if not already
        if self.dimming or not any(
            [await self.get_state(light) == "on" for light in self.lights]
        ):
            self.lg(
                f"{stack()[0][3]}: switching on | {self.dimming = }",
                level=logging.DEBUG,
            )
            await self.lights_on()
        else:
            self.lg(
                f"{stack()[0][3]}: light in {self.room.name.capitalize()} already on β†’ refreshing "
                f"timer | {self.dimming = }",
                level=logging.DEBUG,
            )

        if event != "state_changed_detection":
            await self.refresh_timer()

    def has_min_ad_version(self, required_version: str) -> bool:
        required_version = required_version if required_version else "4.0.7"
        return bool(
            StrictVersion(self.get_ad_version()) >= StrictVersion(required_version)
        )

    async def clear_handles(self, handles: set[str] = None) -> None:
        """clear scheduled timers/callbacks."""

        if not handles:
            handles = deepcopy(self.room.handles_automoli)
            self.room.handles_automoli.clear()

        if self.has_min_ad_version("4.0.7"):
            await asyncio.gather(
                *[
                    self.cancel_timer(handle)
                    for handle in handles
                    if await self.timer_running(handle)
                ]
            )
        else:
            await asyncio.gather(*[self.cancel_timer(handle) for handle in handles])

        self.lg(f"{stack()[0][3]}: cancelled scheduled callbacks", level=logging.DEBUG)

    async def refresh_timer(self) -> None:
        """refresh delay timer."""

        fnn = f"{stack()[0][3]}:"

        # leave dimming state
        self.dimming = False

        dim_in_sec = 0

        # cancel scheduled callbacks
        await self.clear_handles()

        # if no delay is set or delay = 0, lights will not switched off by AutoMoLi
        if delay := self.active.get("delay"):

            self.lg(
                f"{fnn} {self.active = } | {delay = } | {self.dim = }",
                level=logging.DEBUG,
            )

            if self.dim:
                dim_in_sec = int(delay) - self.dim["seconds_before"]
                self.lg(f"{fnn} {dim_in_sec = }", level=logging.DEBUG)

                handle = await self.run_in(self.dim_lights, (dim_in_sec))

            else:
                handle = await self.run_in(self.lights_off, delay)

            self.room.handles_automoli.add(handle)

            if timer_info := await self.info_timer(handle):
                self.lg(
                    f"{fnn} scheduled callback to switch off the lights in {dim_in_sec}s "
                    f"({timer_info[0].isoformat()}) | "
                    f"handles: {self.room.handles_automoli = }",
                    level=logging.DEBUG,
                )

    async def night_mode_active(self) -> bool:
        return bool(
            self.night_mode and await self.get_state(self.night_mode["entity"]) == "on"
        )

    async def is_disabled(self) -> bool:
        """check if automoli is disabled via home assistant entity"""
        for entity in self.disable_switch_entities:
            if (
                state := await self.get_state(entity, copy=False)
            ) and state in self.disable_switch_states:
                self.lg(f"{APP_NAME} is disabled by {entity} with {state = }")
                return True

        return False

    async def is_blocked(self) -> bool:

        # the "shower case"
        if humidity_threshold := self.thresholds.get("humidity"):

            for sensor in self.sensors[EntityType.HUMIDITY.idx]:
                try:
                    current_humidity = float(
                        await self.get_state(sensor)  # type:ignore
                    )
                except ValueError as error:
                    self.lg(
                        f"self.get_state(sensor) raised a ValueError: {error}",
                        level=logging.ERROR,
                    )
                    continue

                self.lg(
                    f"{stack()[0][3]}: {current_humidity = } >= {humidity_threshold = } "
                    f"= {current_humidity >= humidity_threshold}",
                    level=logging.DEBUG,
                )

                if current_humidity >= humidity_threshold:

                    await self.refresh_timer()
                    self.lg(
                        f"πŸ› no motion in {hl(self.room.name.capitalize())} since "
                        f"{hl(natural_time(int(self.active['delay'])))} β†’ "
                        f"but {hl(current_humidity)}%RH > "
                        f"{hl(humidity_threshold)}%RH"
                    )
                    return True

        return False

    async def dim_lights(self, _: Any) -> None:

        message: str = ""

        self.lg(
            f"{stack()[0][3]}: {await self.is_disabled() = } | {await self.is_blocked() = }",
            level=logging.DEBUG,
        )

        # check if automoli is disabled via home assistant entity or blockers like the "shower case"
        if (await self.is_disabled()) or (await self.is_blocked()):
            return

        if not any([await self.get_state(light) == "on" for light in self.lights]):
            return

        dim_method: DimMethod
        seconds_before: int = 10

        if (
            self.dim
            and (dim_method := DimMethod(self.dim["method"]))
            and dim_method != DimMethod.NONE
        ):

            seconds_before = int(self.dim["seconds_before"])
            dim_attributes: dict[str, int] = {}

            self.lg(
                f"{stack()[0][3]}: {dim_method = } | {seconds_before = }",
                level=logging.DEBUG,
            )

            if dim_method == DimMethod.STEP:
                dim_attributes = {
                    "brightness_step_pct": int(self.dim["brightness_step_pct"])
                }
                message = (
                    f"{hl(self.room.name.capitalize())} β†’ "
                    f"dim to {hl(self.dim['brightness_step_pct'])} | "
                    f"{hl('off')} in {natural_time(seconds_before)}"
                )

            elif dim_method == DimMethod.TRANSITION:
                dim_attributes = {"transition": int(seconds_before)}
                message = (
                    f"{hl(self.room.name.capitalize())} β†’ transition to "
                    f"{hl('off')} ({natural_time(seconds_before)})"
                )

            self.dimming = True

            self.lg(
                f"{stack()[0][3]}: {dim_attributes = } | {self.dimming = }",
                level=logging.DEBUG,
            )

            self.lg(f"{stack()[0][3]}: {self.room.room_lights = }", level=logging.DEBUG)
            self.lg(
                f"{stack()[0][3]}: {self.room.lights_dimmable = }", level=logging.DEBUG
            )
            self.lg(
                f"{stack()[0][3]}: {self.room.lights_undimmable = }",
                level=logging.DEBUG,
            )

            if self.room.lights_undimmable:
                for light in self.room.lights_dimmable:

                    await self.call_service(
                        "light/turn_off",
                        entity_id=light,  # type:ignore
                        **dim_attributes,  # type:ignore
                    )
                    await self.set_state(entity_id=light, state="off")

        # workaround to switch off lights that do not support dimming
        if self.room.room_lights:
            self.room.handles_automoli.add(
                await self.run_in(
                    self.turn_off_lights,
                    seconds_before,
                    lights=self.room.room_lights,
                )
            )

        self.lg(message, icon=OFF_ICON, level=logging.DEBUG)

    async def turn_off_lights(self, kwargs: dict[str, Any]) -> None:
        if lights := kwargs.get("lights"):
            self.lg(f"{stack()[0][3]}: {lights = }", level=logging.DEBUG)
            for light in lights:
                await self.call_service("homeassistant/turn_off", entity_id=light)
            self.run_in_thread(self.turned_off, thread=self.notify_thread)

    async def lights_on(self, force: bool = False) -> None:
        """Turn on the lights."""

        self.lg(
            f"{stack()[0][3]}: {self.thresholds.get(EntityType.ILLUMINANCE.idx) = }"
            f" | {self.dimming = } | {force = } | {bool(force or self.dimming) = }",
            level=logging.DEBUG,
        )

        force = bool(force or self.dimming)

        if illuminance_threshold := self.thresholds.get(EntityType.ILLUMINANCE.idx):

            # the "eco mode" check
            for sensor in self.sensors[EntityType.ILLUMINANCE.idx]:
                self.lg(
                    f"{stack()[0][3]}: {self.thresholds.get(EntityType.ILLUMINANCE.idx) = } | "
                    f"{float(await self.get_state(sensor)) = }",  # type:ignore
                    level=logging.DEBUG,
                )
                try:
                    if (
                        illuminance := float(
                            await self.get_state(sensor)  # type:ignore
                        )  # type:ignore
                    ) >= illuminance_threshold:
                        self.lg(
                            f"According to {hl(sensor)} its already bright enough Β―\\_(ツ)_/Β―"
                            f" | {illuminance} >= {illuminance_threshold}"
                        )
                        return

                except ValueError as error:
                    self.lg(
                        f"could not parse illuminance '{await self.get_state(sensor)}' "
                        f"from '{sensor}': {error}"
                    )
                    return

        light_setting = (
            self.active.get("light_setting")
            if not await self.night_mode_active()
            else self.night_mode.get("light")
        )

        if isinstance(light_setting, str):

            # last check until we switch the lights on... really!
            if not force and any(
                [await self.get_state(light) == "on" for light in self.lights]
            ):
                self.lg("Β―\\_(ツ)_/Β―")
                return

            for entity in self.lights:

                if self.active["is_hue_group"] and await self.get_state(
                    entity_id=entity, attribute="is_hue_group"
                ):
                    await self.call_service(
                        "hue/hue_activate_scene",
                        group_name=await self.friendly_name(entity),  # type:ignore
                        scene_name=light_setting,  # type:ignore
                    )
                    if self.only_own_events:
                        self._switched_on_by_automoli.add(entity)
                    continue

                item = light_setting if light_setting.startswith("scene.") else entity

                await self.call_service(
                    "homeassistant/turn_on", entity_id=item  # type:ignore
                )  # type:ignore
                if self.only_own_events:
                    self._switched_on_by_automoli.add(item)

            self.lg(
                f"{hl(self.room.name.capitalize())} turned {hl('on')} β†’ "
                f"{'hue' if self.active['is_hue_group'] else 'ha'} scene: "
                f"{hl(light_setting.replace('scene.', ''))}"
                f" | delay: {hl(natural_time(int(self.active['delay'])))}",
                icon=ON_ICON,
            )

        elif isinstance(light_setting, int):

            if light_setting == 0:
                await self.lights_off({})

            else:
                # last check until we switch the lights on... really!
                if not force and any(
                    [await self.get_state(light) == "on" for light in self.lights]
                ):
                    self.lg("Β―\\_(ツ)_/Β―")
                    return

                for entity in self.lights:
                    if entity.startswith("switch."):
                        await self.call_service(
                            "homeassistant/turn_on", entity_id=entity  # type:ignore
                        )
                    else:
                        await self.call_service(
                            "homeassistant/turn_on",
                            entity_id=entity,  # type:ignore
                            brightness_pct=light_setting,  # type:ignore
                        )

                        self.lg(
                            f"{hl(self.room.name.capitalize())} turned {hl('on')} β†’ "
                            f"brightness: {hl(light_setting)}%"
                            f" | delay: {hl(natural_time(int(self.active['delay'])))}",
                            icon=ON_ICON,
                        )
                    if self.only_own_events:
                        self._switched_on_by_automoli.add(entity)

        else:
            raise ValueError(
                f"invalid brightness/scene: {light_setting!s} " f"in {self.room}"
            )

    async def lights_off(self, _: dict[str, Any]) -> None:
        """Turn off the lights."""

        self.lg(
            f"{stack()[0][3]} {await self.is_disabled()} | {await self.is_blocked() = }",
            level=logging.DEBUG,
        )

        # check if automoli is disabled via home assistant entity or blockers like the "shower case"
        if (await self.is_disabled()) or (await self.is_blocked()):
            return

        # cancel scheduled callbacks
        await self.clear_handles()

        self.lg(
            f"{stack()[0][3]}: "
            f"{any([await self.get_state(entity) == 'on' for entity in self.lights]) = }"
            f" | {self.lights = }",
            level=logging.DEBUG,
        )

        # if any([await self.get_state(entity) == "on" for entity in self.lights]):
        if all([await self.get_state(entity) == "off" for entity in self.lights]):
            return

        at_least_one_turned_off = False
        for entity in self.lights:
            if self.only_own_events:
                if entity in self._switched_on_by_automoli:
                    await self.call_service(
                        "homeassistant/turn_off", entity_id=entity  # type:ignore
                    )  # type:ignore
                    self._switched_on_by_automoli.remove(entity)
                    at_least_one_turned_off = True
            else:
                await self.call_service(
                    "homeassistant/turn_off", entity_id=entity  # type:ignore
                )  # type:ignore
                at_least_one_turned_off = True
        if at_least_one_turned_off:
            self.run_in_thread(self.turned_off, thread=self.notify_thread)

        # experimental | reset for xiaomi "super motion" sensors | idea from @wernerhp
        # app: https://github.com/wernerhp/appdaemon_aqara_motion_sensors
        # mod:
        # https://community.smartthings.com/t/making-xiaomi-motion-sensor-a-super-motion-sensor/139806
        for sensor in self.sensors[EntityType.MOTION.idx]:
            await self.set_state(
                sensor,
                state="off",
                attributes=(await self.get_state(sensor, attribute="all")).get(
                    "attributes", {}
                ),
            )

    async def turned_off(self, _: dict[str, Any] | None = None) -> None:
        # cancel scheduled callbacks
        await self.clear_handles()

        self.lg(
            f"no motion in {hl(self.room.name.capitalize())} since "
            f"{hl(natural_time(int(self.active['delay'])))} β†’ turned {hl('off')}",
            icon=OFF_ICON,
        )

    async def find_sensors(
        self, keyword: str, room_name: str, states: dict[str, dict[str, Any]]
    ) -> list[str]:
        """Find sensors by looking for a keyword in the friendly_name."""

        def lower_umlauts(text: str, single: bool = True) -> str:
            return (
                text.replace("Γ€", "a")
                .replace("ΓΆ", "o")
                .replace("ΓΌ", "u")
                .replace("ß", "s")
                if single
                else text.replace("Γ€", "ae")
                .replace("ΓΆ", "oe")
                .replace("ΓΌ", "ue")
                .replace("ß", "ss")
            ).lower()

        matches: list[str] = []
        for state in states.values():
            if keyword in (entity_id := state.get("entity_id", "")) and lower_umlauts(
                room_name
            ) in "|".join(
                [
                    entity_id,
                    lower_umlauts(state.get("attributes", {}).get("friendly_name", "")),
                ]
            ):
                matches.append(entity_id)

        return matches

    async def configure_night_mode(
        self, night_mode: dict[str, int | str]
    ) -> dict[str, int | str]:

        # check if a enable/disable entity is given and exists
        if not (
            (nm_entity := night_mode.pop("entity"))
            and await self.entity_exists(nm_entity)
        ):
            self.lg("no night_mode entity given", level=logging.DEBUG)
            return {}

        if not (nm_light_setting := night_mode.pop("light")):
            return {}

        return {"entity": nm_entity, "light": nm_light_setting}

    async def build_daytimes(
        self, daytimes: list[Any]
    ) -> list[dict[str, int | str]] | None:
        starttimes: set[time] = set()

        for idx, daytime in enumerate(daytimes):
            dt_name = daytime.get("name", f"{DEFAULT_NAME}_{idx}")
            dt_delay = daytime.get("delay", self.delay)
            dt_light_setting = daytime.get("light", DEFAULT_LIGHT_SETTING)
            if self.disable_hue_groups:
                dt_is_hue_group = False
            else:
                dt_is_hue_group = (
                    isinstance(dt_light_setting, str)
                    and not dt_light_setting.startswith("scene.")
                    and any(
                        await asyncio.gather(
                            *[
                                self.get_state(
                                    entity_id=entity, attribute="is_hue_group"
                                )
                                for entity in self.lights
                            ]
                        )
                    )
                )

            dt_start: time
            try:
                starttime = daytime.get("starttime")
                if starttime.count(":") == 1:
                    starttime += ":00"
                dt_start = (await self.parse_time(starttime, aware=True)).replace(
                    microsecond=0
                )
                daytime["starttime"] = dt_start
            except ValueError as error:
                raise ValueError(
                    f"missing start time in daytime '{dt_name}': {error}"
                ) from error

            # configuration for this daytime
            daytime = dict(
                daytime=dt_name,
                delay=dt_delay,
                starttime=dt_start.isoformat(),  # datetime is not serializable
                light_setting=dt_light_setting,
                is_hue_group=dt_is_hue_group,
            )

            # info about next daytime
            next_dt_name = DEFAULT_NAME
            try:
                next_starttime = str(
                    daytimes[(idx + 1) % len(daytimes)].get("starttime")
                )
                if next_starttime.count(":") == 1:
                    next_starttime += ":00"
                next_dt_name = str(daytimes[(idx + 1) % len(daytimes)].get("name"))
                next_dt_start = (
                    await self.parse_time(next_starttime, aware=True)
                ).replace(microsecond=0)
            except ValueError as error:
                raise ValueError(
                    f"missing start time in daytime '{next_dt_name}': {error}"
                ) from error

            # collect all start times for sanity check
            if dt_start in starttimes:
                raise ValueError(
                    f"Start times of all daytimes have to be unique! "
                    f"Duplicate found: {dt_start}"
                )

            starttimes.add(dt_start)

            # check if this daytime should ne active now
            if await self.now_is_between(str(dt_start), str(next_dt_start)):
                await self.switch_daytime(dict(daytime=daytime, initial=True))
                self.active_daytime = daytime.get("daytime")

            # schedule callbacks for daytime switching
            await self.run_daily(
                self.switch_daytime,
                dt_start,
                random_start=-RANDOMIZE_SEC,
                random_end=RANDOMIZE_SEC,
                **dict(daytime=daytime),
            )

        return daytimes

    def show_info(self, config: dict[str, Any] | None = None) -> None:
        # check if a room is given

        if config:
            self.config = config

        if not self.config:
            self.lg("no configuration available", icon="‼️", level=logging.ERROR)
            return

        room = ""
        if "room" in self.config:
            room = f" Β· {hl(self.config['room'].capitalize())}"

        self.lg("", log_to_ha=False)
        self.lg(
            f"{hl(APP_NAME)} v{hl(__version__)}{room}", icon=self.icon, log_to_ha=False
        )
        self.lg("", log_to_ha=False)

        listeners = self.config.pop("listeners", None)

        for key, value in self.config.items():

            # hide "internal keys" when displaying config
            if key in ["module", "class"] or key.startswith("_"):
                continue

            if isinstance(value, list) or isinstance(value, set):
                self.print_collection(key, value, 2)
            elif isinstance(value, dict):
                self.print_collection(key, value, 2)
            else:
                self._print_cfg_setting(key, value, 2)

        if listeners:
            self.lg("  event listeners:", log_to_ha=False)
            for listener in sorted(listeners):
                self.lg(f"    Β· {hl(listener)}", log_to_ha=False)

        self.lg("", log_to_ha=False)

    def print_collection(
        self, key: str, collection: Iterable[Any], indentation: int = 0
    ) -> None:

        self.lg(f"{indentation * ' '}{key}:", log_to_ha=False)
        indentation = indentation + 2

        for item in collection:
            indent = indentation * " "

            if isinstance(item, dict):

                if "name" in item:
                    self.print_collection(item.pop("name", ""), item, indentation)
                else:
                    self.lg(
                        f"{indent}{hl(pformat(item, compact=True))}", log_to_ha=False
                    )

            elif isinstance(collection, dict):

                if isinstance(collection[item], set):
                    self.print_collection(item, collection[item], indentation)
                else:
                    self._print_cfg_setting(item, collection[item], indentation)

            else:
                self.lg(f"{indent}Β· {hl(item)}", log_to_ha=False)

    def _print_cfg_setting(self, key: str, value: int | str, indentation: int) -> None:
        unit = prefix = ""
        indent = indentation * " "

        # legacy way
        if key == "delay" and isinstance(value, int):
            unit = "min"
            min_value = f"{int(value / 60)}:{int(value % 60):02d}"
            self.lg(
                f"{indent}{key}: {prefix}{hl(min_value)}{unit} β‰ˆ " f"{hl(value)}sec",
                ascii_encode=False,
                log_to_ha=False,
            )

        else:
            if "_units" in self.config and key in self.config["_units"]:
                unit = self.config["_units"][key]
            if "_prefixes" in self.config and key in self.config["_prefixes"]:
                prefix = self.config["_prefixes"][key]

            self.lg(f"{indent}{key}: {prefix}{hl(value)}{unit}", log_to_ha=False)
dewet22 commented 2 years ago

@Allthebester thank you so much – I was literally just reading this issue after finally figuring out I haven't been going crazy and restarting all my motion sensors because my lights were going wild. Hot-patched in your three changes and that seems to work so far!

henrikeri commented 2 years ago

@Allthebester Good catch! Seems to be working for me as well. Should we make a pull request so we can solve it for the users not frequenting gitub?

Allthebester commented 2 years ago

@Allthebester Good catch! Seems to be working for me as well. Should we make a pull request so we can solve it for the users not frequenting gitub?

I am not sure how it works exactly, but I have made a request here: https://github.com/benleb/ad-automoli/compare/master...Allthebester:patch-1?expand=1

EDIT: Done here: https://github.com/benleb/ad-automoli/pull/91

legovaer commented 2 years ago

As I mentioned in #91 ; I've lost a lot of time on reading and re-reading the docs.

I mentioned this issue also on discourse hoping other people won't go crazy themselves.

Thanks for this you guys! πŸ‘

benleb commented 2 years ago

Fixed v0.11.3 available! :) Sorry and thanks for reporting and to @Allthebester for fixing!! 🀝

clipse2004 commented 2 years ago

@benleb thx ;) Could you possibly take a look at notifreeze? That doesn't work with the new appdaemon anymore either and I urgently need this for the girlfriend πŸ˜…πŸ˜

benleb commented 2 years ago

this weekend πŸ‘