imhotep / hass-unifi-access

Unifi Access Integration for Home Assistant
Apache License 2.0
65 stars 16 forks source link

New Feature form API? #44

Closed aLAN-LDZ closed 1 month ago

aLAN-LDZ commented 3 months ago

Can You add set emergency mode?

image

or set temporary door locking rule? to stay on lock/unlock status?

image

imhotep commented 3 months ago

Would you like to have this as a service call?

aLAN-LDZ commented 3 months ago

First of all, thanks for your answer. I tried to fork and add options myself, but it's not my level yet :P

I was thinking about making two switches for Emergency Status

One set to true does evacuation, the other set to true does lockdown. Set to false disables this mode.

However, the Temporary Door Locking Rule, I don't really know how. I would like, or rather my wife ;) who is dissatisfied that she has to unlock the door with a card/PIN during the day, to be able to set the automation so that if someone is at home - leave it unlocked

in fact, implement it the way you think will be the best. You will have a better experience. From my perspective, I need to be able to leave the door open. If possible, thank you very much - there is nothing worse than a nervous woman xD

imhotep commented 2 months ago

@aLAN-LDZ I've been playing around with this and I was able to add switches to the integration: evacuation_lockdown

However, I did notice that every time I hit either evacuation or lockdown, it will sound the alarm. No matter what the alarm setting is (even if it's set to never go off). Is this something you really want?

Also right now, it's polling for evacuation and lockdown status every 3 seconds. Since the websocket API is not documented I'd have to dig in and see if we do get emergency updates via websockets to avoid polling too much.

aLAN-LDZ commented 2 months ago

Generally, I need an option that will be able to leave the door in the "leave open/unlock" status, maybe the 7.10 API option will be better. I just found two examples. I looked at how they work on the UI website

image

imhotep commented 2 months ago

Gotcha. So definitely not evacuation and lockdown then. The door locking rule adds some challenges from an interface standpoint. I am unsure if we should be using an input_select or a service call. input_select (basically a dropdown) may be better for ease of use but then that adds challenges for custom locking mode which requires an interval.

aLAN-LDZ commented 2 months ago

basically a dropdown seems like a better idea, if i could help somehow let me know. IMG_2666

imhotep commented 2 months ago

@aLAN-LDZ can you try this branch and let me know if it works for you?

aLAN-LDZ commented 2 months ago

Yes, it works great, thank you. I tested all settings.

imhotep commented 1 month ago

Check out v1.2.0