From 4117a2aa900bf052d6108a7303e099d7063db701 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 1 Oct 2024 21:19:39 +0200 Subject: [PATCH] fix AttributeError: 'list' object has no attribute 'name' https://github.com/diyhue/diyHue/issues/1049 --- BridgeEmulator/functions/daylightSensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BridgeEmulator/functions/daylightSensor.py b/BridgeEmulator/functions/daylightSensor.py index dcaf2da69..d108dd274 100644 --- a/BridgeEmulator/functions/daylightSensor.py +++ b/BridgeEmulator/functions/daylightSensor.py @@ -39,14 +39,14 @@ def daylightSensor(tz, sensor):#tz = timezone logging.debug("sleep finish at " + current_time.strftime("%Y-%m-%dT%H:%M:%S")) sensor.state = {"daylight":False,"lastupdated": current_time.strftime("%Y-%m-%dT%H:%M:%S")} sensor.dxState["daylight"] = current_time - rulesProcessor(["sensors","1"], current_time) + rulesProcessor(sensor, current_time) elif deltaSunriseOffset > 0 and deltaSunriseOffset < 3600: logging.info("will start the sleep for sunrise") sleep(deltaSunriseOffset) logging.debug("sleep finish at " + current_time.strftime("%Y-%m-%dT%H:%M:%S")) sensor.state = {"daylight":True,"lastupdated": current_time.strftime("%Y-%m-%dT%H:%M:%S")} sensor.dxState["daylight"] = current_time - rulesProcessor(["sensors","1"], current_time) + rulesProcessor(sensor, current_time) # v2 api routines for key, instance in bridgeConfig["behavior_instance"].items(): if "when_extended" in instance.configuration: