Skip to content

Commit

Permalink
login update
Browse files Browse the repository at this point in the history
  • Loading branch information
chomupashchuk committed Apr 12, 2022
1 parent 6798026 commit 34086e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions custom_components/aquaariston/aristonaqua.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class AquaAristonHandler:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""

_VERSION = "1.0.46"
_VERSION = "1.0.48"

_LOGGER = logging.getLogger(__name__)
_LEVEL_CRITICAL = "CRITICAL"
Expand Down Expand Up @@ -902,18 +902,20 @@ def _check_showers_temp(self):
def _get_plant_id(self, resp):
plant_id = ""
if resp.url.startswith(self._url + "/PlantDashboard/Index/") or resp.url.startswith(
self._url + "/PlantManagement/Index/") or resp.url.startswith(
self._url + "/PlantPreference/Index/") or resp.url.startswith(
self._url + "/Error/Active/") or resp.url.startswith(
self._url + "/PlantGuest/Index/") or resp.url.startswith(
self._url + "/TimeProg/Index/"):
plant_id = resp.url.split("/")[5]
self._url + "/PlantManagement/Index/") or resp.url.startswith(
self._url + "/PlantPreference/Index/") or resp.url.startswith(
self._url + "/Error/Active/") or resp.url.startswith(
self._url + "/PlantGuest/Index/") or resp.url.startswith(
self._url + "/TimeProg/Index/"):
plant_id = resp.url.split("/")[5]
elif resp.url.startswith(self._url + "/PlantData/Index/") or resp.url.startswith(
self._url + "/UserData/Index/"):
plant_id_attribute = resp.url.split("/")[5]
plant_id = plant_id_attribute.split("?")[0]
self._url + "/UserData/Index/"):
plant_id_attribute = resp.url.split("/")[5]
plant_id = plant_id_attribute.split("?")[0]
elif resp.url.startswith(self._url + "/Menu/User/Index/"):
plant_id = resp.url.split("/")[6]
plant_id = resp.url.split("/")[6]
elif resp.url.startswith(self._url + "/R2/Plant/Index/"):
plant_id = resp.url.split("/")[6].split("?")[0]
else:
self._LOGGER.warning('%s Authentication login error', self)
raise Exception("Login parsing of URL failed")
Expand Down
2 changes: 1 addition & 1 deletion custom_components/aquaariston/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"requirements": [],
"dependencies": [],
"codeowners": ["@chomupashchuk"],
"version": "1.0.47"
"version": "1.0.48"
}

0 comments on commit 34086e3

Please sign in to comment.