Unifi Network Integration - Shut Down Entity

Hi guys; how awesome would it be if this integration would have a Shut Down button. In that case Home Assistant could initiate a gracefull shut down to a Unifi gateway in case of a power outage. There is allready the Network UPS Tools Integration that sees if the UPS is operating on battery, so if that is the case it would be great if a power off command could be triggered to the Unifi gateway. Strange enough there is allready a Restart entity in this integration, so why not add shutdown as well. Happy to hear any thoughts.

If UniFi Network works like UniFi Protect, this is actually not possible. It seems counter intuitive, but shutdown functionality is outside of the application itself.

All of the UniFi apps run inside of UniFi OS and integrate with UniFi OS for various things, disk data, users/permissions/etc. UniFi Network is also unique in that it can run self-hosted as well, which means UniFi OS may not always be there. Within the UniFi app you can do things like restart managed devices, but you cannot shut them down. Shutdown is only on the console level and done completely inside of UniFi OS, not the apps themselves.

You are right; shutdown is at console level in the OS and not started from within the App. What would be a workaround for this ? Any ideas ?

There is no workaround. It is not possible. Someone would need to make an additional UniFi OS integration that is designed to integrate into UniFi OS consoles and not one of the specific apps. The UniFi Network integration is only for UniFi Network, not UniFi OS. the UniFi Protect integration is only for UniFi Protect, not UniFi OS.

1 Like

You should be able to accomplish this through ssh with a shell command.

Here is a write up from proxmox to a udm pro that goes over how to set up the ssh keys as well as the shutdown command.

1 Like