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

Commit 20cd255

Browse files
committed
2 parents ac54b72 + 5d4e9a6 commit 20cd255

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

custom_components/authenticated/sensor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
A platform which allows you to get information
3-
about successfull logins to Home Assistant.
3+
about successful logins to Home Assistant.
44
For more details about this component, please refer to the documentation at
55
https://github.com/custom-components/authenticated
66
"""
@@ -186,14 +186,14 @@ def update(self):
186186
continue
187187
elif new > stored:
188188
updated = True
189-
_LOGGER.info("New successfull login from known IP (%s)", access)
189+
_LOGGER.info("New successful login from known IP (%s)", access)
190190
ipaddress.prev_used_at = ipaddress.last_used_at
191191
ipaddress.last_used_at = tokens[access]["last_used_at"]
192192
except Exception: # pylint: disable=broad-except
193193
pass
194194
else:
195195
updated = True
196-
_LOGGER.warning("New successfull login from unknown IP (%s)", access)
196+
_LOGGER.warning("New successful login from unknown IP (%s)", access)
197197
accessdata = AuthenticatedData(access, tokens[access])
198198
ipaddress = IPData(accessdata, users, self.provider)
199199
ipaddress.lookup()
@@ -259,6 +259,7 @@ def write_to_file(self):
259259
known = self.hass.data[PLATFORM_NAME][known]
260260
info[known.ip_address] = {
261261
"user_id": known.user_id,
262+
"username": known.username,
262263
"last_used_at": known.last_used_at,
263264
"prev_used_at": known.prev_used_at,
264265
"country": known.country,

0 commit comments

Comments
 (0)