You don’t need any other hardware. You can configure a switch for each client you want to control with the Unifi integration, see here for more details.
I’m also interested in doing something similar. In my case I want to make a custom dashboard so the wife can disable the wifi for our daughter if necessary. My wife isn’t massively tech aware so this is probably the easiest way I can think to do it.
However, the linked documentation doesn’t give much in the way of clues as to what YAML is required to get this working.
Can anyone share an example of how you configure a switch for Unifi please?
Read the docs, Unifi can’t be configured through YAML anymore, it’s all done through the UI. Once you configured it you can go to Configuration ->integrations and press the “Options” button for the unifi integration. In the second option page you can choose for which clients you want to be able to enable/disable internet access. After the configuration you’ll have a switch.xxx entity for each of the devices you chose.
I had realised that the configuration had moved from the YAML but i’d failed to notice that when you go into the options for the integration it has three pages and you can only progress to pages 2 and 3 by clicking submit on the first page. It’s not the most intuitive interface.
Thanks for pointing it out - i’ve got it configured now. Might even look at integration with Flic buttons so the wife can switch it on and off just using a button. Hopefully it’s not something we need to use but it’s always best to be prepared.