How to adpat python code and use it on home assistant

Hi,

I found this library:

Its function is to read out data from solar panel invertor via Bluetooth and publish them via mqtt to a https://openenergymonitor.org/ device.

But I would like to adapt it that it publishes data to the home assistant mqtt.

Is there a good guide on how to use custom python codes in home assistant?

thx,

Ben

it looks like the device is supposed to send the information over mqtt.

HA uses mqtt so once you figure out what the mqtt topics are you can just add them to HA as an mqtt sensor.

Yeah, but the difficult part is that setting up the python code to run is not so easy.
For instance where to set the MQTT properties, and so on

What is difficult about it? What part do you need assistance with?

Hue:

Bridges:

  • host: DEVICE_IP_ADDRESS

Allow_unreachable: true

Allow_hue_groups: true

  • host: DEVICE_IP_ADDRESS2

Allow_unreachable: true

Allow_hue_groups: true

It means that the hue component is enabled.

Bridges belong to the configuration item of hue:

There are two sets of three attributes in the two sets under bridges.