I have an RFID reader connected to home assistant which gives me the scanned code in HA.
Now I would like to set up a mapping to map usernames to the RFID tags.
In normal programming languages I’d need a list using key-values. The key is the RFID tag code and the value is the user name.
But I really don’t know where to start looking on how to set something like this up in HA?
I also want to be able to add/remove users from lovelace…
The next step would be to assign “allowed access hours” for the users. But that would need to be dynamically too, since I could add/remove users…
Basically I’d like to make something like this to check if a code is allowed acces:
Code | Name | Access | DayOfWeek | TimeFrom | TimeTo |
---|---|---|---|---|---|
1234 | User 1 | always | |||
5555 | User 2 | controlled | 2 | 07:00 | 15:00 |
5656 | User 3 | controlled | 3 | 12:00 | 14:00 |
5656 | User 3 | controlled | 4 | 12:00 | 14:00 |
User 1 is always allowed access.
User 2 only on tuesday from 07:00-14:00
User 3 on wednesday 12:00-14:00 and thursday 12:00-14:00
Could anyone point me in the right direction on how to make this?
Thanks in advance!
1 post - 1 participant