diff --git a/.gitignore b/.gitignore index 4338a04..12839e7 100644 --- a/.gitignore +++ b/.gitignore @@ -161,4 +161,8 @@ cython_debug/ log.txt -.env \ No newline at end of file +.env +.vscode/c_cpp_properties.json +.vscode/extensions.json +.vscode/launch.json +.vscode/settings.json diff --git a/requirements.txt b/requirements.txt index 8831a66..c74f9e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,4 @@ vl53l1x phue # For statistics -matplotlib +# matplotlib diff --git a/src/simple_hue_counter.py b/src/simple_hue_counter.py index 9cb8281..ecfd431 100644 --- a/src/simple_hue_counter.py +++ b/src/simple_hue_counter.py @@ -63,16 +63,16 @@ def count_change(change: int) -> None: if peopleCount <= 0 and previous_lights_state: # Count was 0, but lights were on => people count was not actually 0 peopleCount = 1 - logging.debug(f"People count corrected to {peopleCount}") + logging.info(f"People count corrected to {peopleCount}") elif peopleCount > 0 and not previous_lights_state: # Count was >0, but lights were off => people count was actually 0 peopleCount = 0 - logging.debug(f"People count corrected to {peopleCount}") + logging.info(f"People count corrected to {peopleCount}") peopleCount += change if peopleCount < 0: peopleCount = 0 - logging.debug(f"People count changed by {change}") + logging.info(f"People count changed by {change}") # Handle light target_light_state = peopleCount > 0 @@ -100,7 +100,7 @@ def set_light_state(target_light_state: bool) -> bool: # Adjust light as necessary hue.set_group(hue_conf["light_group"], {"on": target_light_state}) - logging.debug(f"Light state changed to {target_light_state}") + logging.info(f"Light state changed to {target_light_state}") return previous_lights_state diff --git a/src/smart_hue_counter.py b/src/smart_hue_counter.py index 6d85cb1..1a1fccb 100644 --- a/src/smart_hue_counter.py +++ b/src/smart_hue_counter.py @@ -127,16 +127,16 @@ def count_change(change: int) -> None: if peopleCount <= 0 and previous_lights_state and not motion_triggered_lights: # Count was 0, but lights were on (not because of motion triggers) => people count was not actually 0 peopleCount = 1 - logging.debug(f"People count corrected to {peopleCount}") + logging.info(f"People count corrected to {peopleCount}") elif peopleCount > 0 and not previous_lights_state: # Count was >0, but lights were off => people count was actually 0 peopleCount = 0 - logging.debug(f"People count corrected to {peopleCount}") + logging.info(f"People count corrected to {peopleCount}") peopleCount += change if peopleCount < 0: peopleCount = 0 - logging.debug(f"People count changed by {change}") + logging.info(f"People count changed by {change}") # Handle light target_light_state = peopleCount > 0 @@ -201,7 +201,7 @@ def set_light_scene(target_scene: str) -> bool: # Set lights to scene hue.set_group_scene(hue_conf["light_group"], target_scene) - logging.debug(f"Light scene set to {target_scene}") + logging.info(f"Light scene set to {target_scene}") def set_light_state(target_light_state: bool) -> bool: @@ -223,12 +223,12 @@ def set_light_state(target_light_state: bool) -> bool: if target_light_state and target_scene: # Set to specific scene if exists hue.set_group_scene(hue_conf["light_group"], target_scene) - logging.debug( + logging.info( f"Light state changed to {target_light_state} with scene {target_scene}" ) else: hue.set_group(hue_conf["light_group"], {"on": target_light_state}) - logging.debug(f"Light state changed to {target_light_state}") + logging.info(f"Light state changed to {target_light_state}") return previous_lights_state @@ -249,7 +249,7 @@ def update_scene(): return set_light_scene(scene) - logging.debug(f"Updated scene at {datetime.now().time()} to {scene}.") + logging.info(f"Updated scene at {datetime.now().time()} to {scene}.") def register_time_triggers():