AppDaemon motion detectionlights version 1.1

yeah that should work
only you need to change the app name.

you can only have 1 time MotionLights.

so change it to:

MotionLights:
  module: motionlights
  class: MotionLights
  constrain_start_time: sunset - 00:45:00
  constrain_end_time: 0:00
  sensor: binary_sensor.fibaro_system_fgms001_motion_sensor_sensor_10_0
  entity_on: scene.kitchen_timer
  entity_off: scene.kitchen_timer_off
  delay: 600

MotionLightsNight:
  module: motionlights
  class: MotionLights
  constrain_start_time: 0:00
  constrain_end_time: sunrise + 00:45:00 
  sensor: binary_sensor.fibaro_system_fgms001_motion_sensor_sensor_10_0
  entity_on: scene.kitchen_timer_night
  entity_off: scene.kitchen_timer_nigh_off
  delay: 200

and you are good to go.

Thanks! Also had to change some stuff on time notation but all fine now. Now when someone get’s up in the middle of the night they don’t get blinded by the light. For completeness full code below:

MotionLights:
  module: motionlights
  class: MotionLights
  constrain_start_time: sunset - 00:45:00
  constrain_end_time: "00:00:00"
  sensor: binary_sensor.fibaro_system_fgms001_motion_sensor_sensor_10_0
  entity_on: scene.kitchen_timer
  entity_off: scene.kitchen_timer_off
  delay: 600

MotionLights_2:
  module: motionlights
  class: MotionLights
  constrain_start_time: "00:00:00"
  constrain_end_time: "06:00:00"
  sensor: binary_sensor.fibaro_system_fgms001_motion_sensor_sensor_10_0
  entity_on: scene.kitchen_timer_night
  entity_off: scene.kitchen_timer_night_off
  delay: 200

MotionLights_3:
  module: motionlights
  class: MotionLights
  constrain_start_time: "06:00:00"
  constrain_end_time: sunrise + 00:45:00 
  sensor: binary_sensor.fibaro_system_fgms001_motion_sensor_sensor_10_0
  entity_on: scene.kitchen_timer
  entity_off: scene.kitchen_timer_off
  delay: 600

I am pretty new to appDaemon custom modules.

I put the script in the following folder: /conf/apps/motionLights.py

I get the following error when starting appDaemon

2023-08-03 17:12:36.672416 WARNING AppDaemon: No app description found for: /conf/apps/motionLights.py - ignoring

Is there more needed to get this working? or is the example outdated?