I’m using Home Assistant (HAS) to operate and monitor lights, audio and weather. And as HAS has an Zabbix integration I got all my data in Zabbix. But since Zabbix 6.4 there are some breaking changes in the Zabbix Api. Although small, I reported a bug on 29th of january. I guess it has no priority. Instead of waiting I was inspired by Janne (a cool fellow with a zabbix heart) to use the http agent functionality within Zabbix and getting the information I needed from HAS. What I really missed was my energy consumption compared to the weather outside which I futher use to make my house more energy neutral.
There is a step you must take so Zabbix can communicate directly to HAS. First create a long-lived access token (under user settings).
Put it away somewhere save, you will need this to gain api access later on.
First create an empty host within Zabbix, you can ignore the creation of an interface as all work is done by Zabbix (or one of his proxies) itself.
Next, create an item on that host using type “http agent” and fill in the necessary information.
On the third tab, adjust the preproccesing step.
Do not forget your Bearer token in the headers option.
In short what this does is getting energy consumption from HAS concerning the L1 phase in my home fuse box. But there is more, a lot more info we can pull out of our HAS installation. This is just an example.
If you want a more complete setup, visit my Git page where you can find a template which I currently use.