Description | This article describes how to configure the FortiOS Integration for Home Assistant. |
Scope |
FortiOS 7.2.x, 7.4.x, 7.6.x. |
Solution |
It is possible to integrate FortiOS as a device tracker within Home Assistant. Follow the steps below to accomplish this.
FortiOS Preparation:
Create a new API key for the Home Assistant to utilize with read-only permissions:
After creating the account, the API key will be displayed so it can be copied. Note: The key is only displayed one time. If the key is lost, it will need to be regenerated.
Additionally, note the IP address of the interface that the Home Assistant will send requests to, as well as whether a non-standard https port is being used. Lastly, ensure https/http is set to 'allowed' under the interface's administrative access.
Home Assistant Configuration:
The FortiOS integration is not installed as usual via the GUI Integration page. Instead, it is created by modifying the Home Assistant configuration.yaml file with the following:
#FortiOS Integration
After the configuration has been added, restart the Home Assistant server. After a reboot the FortiOS integration can been seen in the integration list. Additionally, all devices the FortiGate has detected will be added as entities in Home Assistant.
Validating:
In FortiOS, there should now be successful API requests from the Home Assistant server under the API logs:
Additionally, the devices and their online/offline status can be compared in FortiOS and Home Assistant.
Dashboard -> Users & Devices -> Assets.
Settings - > Devices & services -> Entities.
Filter for 'Device tracker'.
Now that the devices and their status are integrated from FortiOS, they can be be configured as desired within Home Assistant.
Note: The Home Assistant FortiOS integration is not developed or maintained by Fortinet and therefore cannot be supported via TAC. For any issues, it is recommended to check or post in the Fortinet Community Forums. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.