Using a Python API on Home Assistant

I have used the United Energy integration which is no longer supported. In search of a replacement I have found the following

However this is not a Home Assistant integration but simply a Python API. Looking at the Home Assistant documentation I have found this >> Python Scripts - Home Assistant

I’m not a developer so this question may be innocent. Is it possible for me to enable/integrate this energy Easy script on Home Assistant? How would I go about it?

The python_script integration does not allow you to import modules so you would need to make a custom component instead. Another option is to write a stand-alone python scripts that sends the data through mqtt to Home Assistant.

Thanks for getting back. What you’re suggesting is beyond my skill level - certainly for now :slight_smile:

Maybe the shell_command integration would allow you to run a python script with modules. But I don’t know enough about HA to say if the results could be fed back in.

It’s a shame the UA integration was abandoned. I see someone else forked it, but their fork hasn’t had updates in a long time, but it does work. Kind-of. The main problem seems to be that the data are only collected when HA starts up - the integration seems to run only once on a restart, and that’s all.

I’m not a developer, but I know enough Python that I could probably get a script to run using the API. Integrating it with HA is something I have no knowledge about.