Skip to content

Commit

Permalink
Merge pull request #84 from dpurrington/contribs
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarmer08 authored Jan 15, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 38fa764 + 8399f6b commit ebb747a
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -67,6 +67,8 @@ async def async_toggle(self, onoff):
if onoff == "1":
self._state = True
else:
# We don't know what is coming in this parameter and the API is sensitive to other values
onoff = "0"
self._state = False
if self._wifi_device:
_LOGGER.info(
@@ -87,7 +89,7 @@ async def async_toggle(self, onoff):
)
else:
_LOGGER.info(
"SengledApi: Bulb %s %s turning on.",
"SengledApi: Bulb %s %s toggling.",
self._friendly_name,
self._device_mac,
)
2 changes: 1 addition & 1 deletion custom_components/sengledapi/sengledapi/sengledapi.py
Original file line number Diff line number Diff line change
@@ -343,7 +343,7 @@ def publish_mqtt(self, topic, payload=None):
_LOGGER.debug("SengledApi: Publish Mqtt %s", str(r))
try:
r.wait_for_publish()
return r.is_published
return r.is_published()
except ValueError:
pass

0 comments on commit ebb747a

Please sign in to comment.