Skip to content

Commit

Permalink
Disabled discovery/update on start if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Galorhallen committed Feb 3, 2023
1 parent b4352ea commit ea4a042
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def main(controller: GoveeController):
loop = asyncio.new_event_loop()
controller: GoveeController = GoveeController(
loop,
discovery=True,
discovery=False,
discovered_callback=discovered_callback,
evicted_callback=lambda device: print(f"Evicted {device}"),
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "govee-local-api"
version = "1.1.0"
version = "1.1.1"
authors = [
{ name="Galorhallen", email="andrea.ponte1987@gmail.com" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/govee_local_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from .controller import GoveeController
from .device import GoveeDevice

__version__ = "1.1.0"
__version__ = "1.1.1"
6 changes: 4 additions & 2 deletions src/govee_local_api/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ async def start(self):
lambda: self, local_addr=(self._listening_address, self._listening_port)
)

self.send_discovery_message()
self.send_update_message()
if self._discovery:
self.send_discovery_message()
if self._autoupdate:
self.send_update_message()

def clenaup(self):
if self._transport:
Expand Down

0 comments on commit ea4a042

Please sign in to comment.