Skip to content

Commit

Permalink
Fix add MQTT bulb
Browse files Browse the repository at this point in the history
  • Loading branch information
dewgenenny committed Dec 3, 2023
1 parent 9589649 commit 79ff658
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions screensync/screen_sync/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ def add_bulb(self, bulb_type, **kwargs):
self._add_magichome_bulb(**kwargs)
# Add more elif blocks for other bulb types as needed

def _add_mqtt_bulb(self, topic, placement):
def _add_mqtt_bulb(self, mqtt_topic, placement):
"""Adds a new MQTT bulb configuration."""
mqtt_bulb_count = len([s for s in self.config.sections() if s.startswith('BulbMQTT')])
section_name = f'BulbMQTT{mqtt_bulb_count + 1}'
self.config[section_name] = {

'topic': topic,
'topic': mqtt_topic,
'placement': placement

}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='ScreenSync',
version='0.0.2',
version='0.0.3',
author='Tom George',
author_email='[email protected]',
description='A Python tool for synchronizing screen colors with smart bulbs.',
Expand Down

0 comments on commit 79ff658

Please sign in to comment.