Feature Request - Adding Users to log book
Closed this issue · 1 comments
Not sure if this is currently possible or not but Id like to run certain automations based on which user accessed the Doorbell sensor. From what I can tell, the Unifi access integration will tell you if the device has been locked or unlocked but doesnt give any specifics on who unlocked the device if done from the doorbell.
So as I understand it, logbook/history is basically the history of entity status changes. In order to do what you are requesting, we would have to create a person entity for each user, which is currently doable. The users in Unifi Access won't automatically match the users in your Home Assistant instance so that's problem number 1.
Home Assistant currently doesn't associate door locks/unlocks with a given person either. There is no such thing as: Front door has been locked/unlocked by John. It just tells you that the door has been locked or unlocked at a given date/time.
The other problem is that the Unifi Access API is currently limited and doesn't provide information on which user unlocks a door when that event happens.
There is currently a way to fetch history/log of door locks/unlocks which gives information about actors/users that lock/unlock the doors but it's cumbersome to use and not very applicable for home automation.