Skip to content

Commit 8c76679

Browse files
fix for picam with night vision disabled but image brightening enabled
1 parent 5fe06c6 commit 8c76679

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

camera/camera.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ async def choose_cam(self, task: Camera_Task):
181181

182182
# ToDo: improve here if two are enabled for night vision
183183
# ToDo: further extended unit tests required here
184-
185184
if self.config.blink_night_vision:
186185
self.logger.debug("blink night_vision is enabled")
187186
result = await self._blink_foto_helper(task)
188187
return await self._check_blink_result(task, result)
189188

190-
if self.config.picam_night_vision:
191-
self.logger.debug("picam night_vision is enabled")
189+
if self.config.picam_night_vision or self.config.picam_image_brightening:
190+
self.logger.debug(f"picam night_vision is {self.config.picam_night_vision}")
191+
self.logger.debug(f"picam image_brightening is {self.config.picam_image_brightening}")
192192
result = await self._picam_foto_helper(task)
193193
return await self._check_picam_result(task, result)
194194

@@ -405,6 +405,7 @@ def detect_daylight(self) -> bool:
405405
longitude=self.config.lon,
406406
timezone=self.config.timezone
407407
)
408+
self.logger.debug(f"location: {location}")
408409
s = sun(location.observer, date=local_date)
409410
elif self.config.country is not None:
410411
self.logger.debug("using country - city for daylight detection")

0 commit comments

Comments
 (0)