Unifi configuration control from HA possible?

I have a full unifi network including a dream machine pro at the heart of it

I have a number of traffic rules defined that can easily be enabled or disable from the UI, these are mostly an easy way for me to control the internet to the kids devices if needed

i believe there is an integration, but i don’t think it offers this yet

i read there is a few api projects about but cant seem to find that that might allow this and wanted to see if anyone has done it as it would be great to have buttons in HA for some of these entries to easily turn them on and off

thanks

1 Like

There is a open PR for it Add Traffic Rule switches to UniFi Network by ViViDboarder · Pull Request #104671 · home-assistant/core · GitHub

But its paused for the moment.

2 Likes

According to a few posts on the UniFi forums, the API calls to enable/disable traffic rules stopped working recently.

Once the fix it (IF they fix it), you could write some RESTful switches to modify the traffic rules and access the API directly.

https://community.ui.com/questions/I-am-looking-for-the-REST-API-call-for-Traffic-Rules/85ad79bf-973f-4093-8ad9-4083f4adead1

This is now available with the following HACS integration.

Traffic rules are available since a few releases back in the ordinary integration as well

Where is this found out? Not seeing it in the integration.

Do you have an admin account?

I am logged in with a second HA specific super admin account.

Then you should have switches created for them, you’re not mixing traffic RULES up with traffic ROUTES?

Yea I’m not seeing anything. I have multiple traffic rules created. I only have advanced rules created, no simple rules. Think that could cause it?

I think its the same data under the good just more settings. Enable debug logging and share the log output.

You’re running latest hass version right?