Blocking clients Unifi Integration

Hi,

I have a question.
I would like to block certain clients based on Unifi Integration after 60 minutes connectivity. This is the code I have so far:

alias: Disconnect clients after 1 hour
description: Automatically disconnect clients after 1 hour of being online
triggers:
  - entity_id:
      - device_tracker.unifi_default_f4
      - device_tracker.unifi_default_04
    from: not_home
    to: home
    for: "01:00:00"
    trigger: state
conditions:
  - condition: state
    entity_id: input_boolean.clients_reset
    state: "off"
actions:
  - data:
      entity_id: device_tracker.unifi_default_f4
    action: unifi.block_client
  - data:
      entity_id: device_tracker.unifi_default_04
    action: unifi.block_client
  - entity_id: input_boolean.clients_reset
    action: homeassistant.turn_off
mode: single

Using this results in a error:

The automation "Disconnect clients after 1 hour" (automation.disconnect_clients_after_1_hour) has an unknown action: unifi.block_client.

So the yaml code Unifi.block_client isn’t working.
Checking the unifi services I neither can find “block_client” as a service.
Isn’t this supported?

I also read something about block-sta, but also without succes.

Has any one been successfull on this?

Thanks!

I’ve never heard of that action, but you can use the Unifi network options and configure clients you want to have a network access switch:

thanks, I will give this a try