home_automations.py 434 B

1234567891011
  1. # This state is set every midnight by the ext_lights_control-script
  2. state.persist('pyscript.home_auto_lights_off_has_been_night','false')
  3. @state_trigger("int(sensor.lux_outside_the_garage) > 1000", state_hold_false=0)
  4. def automate_home_auto_lights_off():
  5. if( pyscript.home_auto_lights_off_has_been_night == 'true' ):
  6. pyscript.home_auto_lights_off_has_been_night = 'false'
  7. pyscript.state_goto_all_off();