Fortigate


This is a FortiGate presence sensor based on device detection of the FortiGate API

FortiGate set up

Configure the FortiGate with a USERNAME API user and assign its minimum rights profile:

config system accprofile
    edit "homeassistant_profile"
        set authgrp read
    next
end

config system api-user
    edit "USERNAME"
        set api-key API_KEY
        set accprofile "homeassistant_profile"
        set vdom "root"
        config trusthost
            edit 1
                set ipv4-trusthost <trusted subnets>
            next
        end
    next
end

Configuration

Add the following to your configuration.yaml file:

# Example configuration.yaml entry
fortigate:
  host: HOST_IP
  username: YOUR_USERNAME
  api_key: YOUR_API_KEY

Configuration Variables

host

(string)(Required)

The IP address of the FortiGate device.

username

(string)(Required)

The username of the user that will connect to the FortiGate device.

api_key

(string)(Required)

The API key associated with the user.

devices

(string)(Optional)

The MAC addresses of the devices to monitor.

Errors

If the rights of the profile are not sufficient, you will get the following error:

ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved