classConfig(ConfigObject):defconfig(self):config={}# Clock config["clock"]={}config["clock"]["location"]="copenhagen"# Zwaveconfig["zwave"]={}config["zwave"]["device"]="/dev/serial/by-id/usb_id_zwave_controller"returnconfigdefsetup(self):# time events ----------------------------------------------------------self.clock=EventObject("clock","now")self.sunset=EventObject("clock","sunset")self.sunrise=EventObject("clock","sunrise")# Yeelight devices ---------------------------------------------------------self.light_power=EventObject("yeelight","192.168.0.20:power")# true/falseself.light_brightness=EventObject("yeelight","192.168.0.20:bright")# 1-100self.light_temprature=EventObject("yeelight","192.168.0.20:temp")# 1700-6500 or 2500-7500 depends on lightself.light_color=EventObject("yeelight","192.168.0.20:color")# hex value example red:ff0000 green:00ff00 blue:0000ffself.light_ambient_power=EventObject("yeelight","192.168.0.20:bg_power")# true/falseself.light_ambient_brightness=EventObject("yeelight","192.168.0.20:bg_bright")# 1-100self.light_ambient_temprature=EventObject("yeelight","192.168.0.20:bg_temp")# 1700-6500 or 2500-7500 depends on lightself.light_ambient_color=EventObject("yeelight","192.168.0.20:bg_color")# hex value example red:ff0000 green:00ff00 blue:0000ffdefprocess_event(self):ifself.clock.event==self.sunset.value:self.light_power.set("true")self.light_brightness.set("50")self.light_temprature.set("5000")self.light_color.set("ff0000")ifself.clock.event==self.sunrise.value:self.light_power.set("false")