Skip to content

Commit

Permalink
scene already active logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
zim514 committed Dec 27, 2023
1 parent c1da472 commit 475c0c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions script.service.hue/resources/lib/lightgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,14 @@ def _is_scene_light_already_active(self, scene_id):

# Find the current scene from the scene data
current_scene = next((scene for scene in self.parent.bridge.scene_data['data'] if scene['id'] == scene_id), None)

Check notice on line 244 in script.service.hue/resources/lib/lightgroup.py

View workflow job for this annotation

GitHub Actions / Qodana Community for Python

PEP 8 coding style violation

PEP 8: E501 line too long (125 \> 120 characters)
#xbmc.log(f"[script.service.hue] _is_scene_already_active: Current scene: {current_scene}")

Check notice on line 245 in script.service.hue/resources/lib/lightgroup.py

View workflow job for this annotation

GitHub Actions / Qodana Community for Python

PEP 8 coding style violation

PEP 8: E265 block comment should start with '# '
if not current_scene:
xbmc.log("[script.service.hue] _is_scene_already_active: Current scene not found in scene data")
return False

# Check if any light in the current scene is on
for action in current_scene['actions']:
#xbmc.log(f"[script.service.hue] _is_scene_already_active: Checking light {action['target']['rid']} in the scene")

Check notice on line 252 in script.service.hue/resources/lib/lightgroup.py

View workflow job for this annotation

GitHub Actions / Qodana Community for Python

PEP 8 coding style violation

PEP 8: E501 line too long (130 \> 120 characters)

Check notice on line 252 in script.service.hue/resources/lib/lightgroup.py

View workflow job for this annotation

GitHub Actions / Qodana Community for Python

PEP 8 coding style violation

PEP 8: E265 block comment should start with '# '
light_id = action['target']['rid']
light_state = next((state for state in all_light_states['data'] if state['id'] == light_id), None)
if light_state and 'on' in light_state and light_state['on']['on']:
Expand Down

0 comments on commit 475c0c0

Please sign in to comment.