Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
cyr-ius committed Jan 23, 2022
1 parent 6475b5a commit 64d104e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/pdns/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"issue_tracker": "https://github.com/Cyr-ius/hass-pdns/issues",
"codeowners": ["@Cyr-ius"],
"iot_class": "cloud_polling",
"version": "2.1.8"
"version": "2.1.9"
}
6 changes: 3 additions & 3 deletions custom_components/pdns/pdns.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, servername, alias, username, password, session=None):
self.authentification = BasicAuth(username, password)

async def async_update(self):
"""Update Hostname to Power DNS."""
"""Update Alias to Power DNS."""
self.ip = await self._async_get_public_ip()
try:
params = {"myip": self.ip, "hostname": self.alias}
Expand All @@ -40,11 +40,11 @@ async def async_update(self):
"public_ip": self.ip,
"last_seen": datetime.now(),
}
raise PDNSFailed(body.strip(), self.hostname)
raise PDNSFailed(body.strip(), self.alias)
except ClientError as error:
raise CannotConnect("Can't connect to API : %s", error) from error
except asyncio.TimeoutError as error:
raise TimeoutExpired(f"API Timeout from {self.hostname}") from error
raise TimeoutExpired(f"API Timeout from {self.alias}") from error

async def _async_get_public_ip(self):
"""Get Public ip address."""
Expand Down

0 comments on commit 64d104e

Please sign in to comment.