Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Nov 10, 2019
2 parents ac54b72 + 5d4e9a6 commit 20cd255
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions custom_components/authenticated/sensor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
A platform which allows you to get information
about successfull logins to Home Assistant.
about successful logins to Home Assistant.
For more details about this component, please refer to the documentation at
https://github.com/custom-components/authenticated
"""
Expand Down Expand Up @@ -186,14 +186,14 @@ def update(self):
continue
elif new > stored:
updated = True
_LOGGER.info("New successfull login from known IP (%s)", access)
_LOGGER.info("New successful login from known IP (%s)", access)
ipaddress.prev_used_at = ipaddress.last_used_at
ipaddress.last_used_at = tokens[access]["last_used_at"]
except Exception: # pylint: disable=broad-except
pass
else:
updated = True
_LOGGER.warning("New successfull login from unknown IP (%s)", access)
_LOGGER.warning("New successful login from unknown IP (%s)", access)
accessdata = AuthenticatedData(access, tokens[access])
ipaddress = IPData(accessdata, users, self.provider)
ipaddress.lookup()
Expand Down Expand Up @@ -259,6 +259,7 @@ def write_to_file(self):
known = self.hass.data[PLATFORM_NAME][known]
info[known.ip_address] = {
"user_id": known.user_id,
"username": known.username,
"last_used_at": known.last_used_at,
"prev_used_at": known.prev_used_at,
"country": known.country,
Expand Down

0 comments on commit 20cd255

Please sign in to comment.