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

User as state of last successful authentication? #87

Open
jatgm1 opened this issue Aug 26, 2022 · 7 comments
Open

User as state of last successful authentication? #87

jatgm1 opened this issue Aug 26, 2022 · 7 comments

Comments

@jatgm1
Copy link

jatgm1 commented Aug 26, 2022

Version of the custom_component

Describe the bug
A clear and concise description of what the bug is.
It seems that this still sends fully functional persistent notifications with the current version of home assistant, and works fine except that the state of sensor.last_sucessful_authentification is just an ip address, can that be changed to a user? Or have the user added as an attribute? It works fine in the persistent notifications. And despite being depreciated is still functional. And is a really useful tool in general. Like super useful.
log

Add your logs here.
@Electronlibre2012
Copy link

yes, i am agree, dont understand why it is depreciated?

@jatgm1
Copy link
Author

jatgm1 commented Aug 26, 2022

If someone could just add user as an attribute that would fix everything. Idk how it works so idk what to do but that would be frekin awesome.

Edit Its now telling me to remove the repository? That stinks it's super useful if it just had the user as an attribute.

@DavidFW1960
Copy link

Does the yaml log file of auth contain user info? Maybe we can parse that with a template. I dont understand why its deprecated either as there is no alternate we can use

@jatgm1
Copy link
Author

jatgm1 commented Aug 27, 2022

I mean the persistent notifications do so I would imagine it has to

@jatgm1
Copy link
Author

jatgm1 commented Aug 27, 2022

Just checked, yep it has it. At the end of the entry for each login it's got the user right there. So how would one write something to parse it for the user and make a separate entity to display the user of the last entity? It's called ".ip_authenticated.yaml" the first entry is the ip address and the next lines are two spaces in and the last, also two spaces down is the user

@DavidFW1960
Copy link

Ok ao all the other data is included as attributes including the username as you can see in dev-tools so you can definitely extract and display that easily

@DavidFW1960
Copy link

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants