Skip to content

Commit

Permalink
Merge pull request #3 from JohNan/johnan/ready-event
Browse files Browse the repository at this point in the history
Handle ready event
  • Loading branch information
JohNan authored Oct 6, 2023
2 parents 1e5347a + dfc4852 commit ca3f42e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyflichub/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ def _handle_event(self, event: Event):
button = self._get_button(event.button)
_LOGGER.debug(f"Button {button.name} was {event.action}")

if event.event == 'buttonConnected':
button = self._get_button(event.button)
_LOGGER.debug(f"Button {button.name} is connected")

if event.event == 'buttonReady':
button = self._get_button(event.button)
_LOGGER.debug(f"Button {button.name} is ready")

if self._event_callback is not None and button is not None:
self._event_callback(button, event)

Expand Down

0 comments on commit ca3f42e

Please sign in to comment.