authenticated icon indicating copy to clipboard operation
authenticated copied to clipboard

User as state of last successful authentication?

Open jatgm1 opened this issue 3 years ago • 7 comments

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.

jatgm1 avatar Aug 26 '22 18:08 jatgm1

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

Electronlibre2012 avatar Aug 26 '22 19:08 Electronlibre2012

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.

jatgm1 avatar Aug 26 '22 19:08 jatgm1

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

DavidFW1960 avatar Aug 27 '22 00:08 DavidFW1960

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

jatgm1 avatar Aug 27 '22 01:08 jatgm1

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

jatgm1 avatar Aug 27 '22 01:08 jatgm1

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 avatar Aug 27 '22 05:08 DavidFW1960

image

DavidFW1960 avatar Aug 27 '22 05:08 DavidFW1960