Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
tomeko12 committed Dec 29, 2022
1 parent 9ea3778 commit bfea29d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='pyelectroluxconnect',
version='0.3.9',
version='0.3.10',
description='Interface for Electrolux Connectivity Platform API',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
16 changes: 6 additions & 10 deletions src/pyelectroluxconnect/Session.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,16 +916,12 @@ def getApplianceConnectionState(self,
_json = self._requestApi(
urls.getApplianceConnectionState(appliance))

if(_json["status"] == "OK"):
return {
"id": applianceId,
"status": _json[0]["stringValue"],
"timestamp": _json[0]["spkTimestamp"]
}
else:
_LOGGER.error(f"Error while get appliance {applianceId} state: {_json['message']}")
raise Exception(_json["message"])

return {
"id": applianceId,
"status": _json[0]["stringValue"],
"timestamp": _json[0]["spkTimestamp"]
}

return None

def getApplianceState(self,
Expand Down

0 comments on commit bfea29d

Please sign in to comment.