dreadnought / python-daly-bms

Python module for Daly BMS devices
MIT License
82 stars 37 forks source link

Mqtt support with fixes and some more features #13

Closed birdie1 closed 2 years ago

birdie1 commented 2 years ago

I fixed some of the code of brendanjerwin and added some more features regarding home assistant discovery.

Summary of my changes: Fix --all option with --mqtt (It can handle unlimited depth of output dictionary) Fix missing retain flag for hass discovery Aggregate all sensors into one device in hass discovery Add proper device_classes and units_of_measurements to hass discovery Disable print output if mqtt is enabled Add some debug statements Only import module paho.mqtt if necessary

It imports the paho dependency now only if necessary as you mentioned at: https://github.com/dreadnought/python-daly-bms/pull/8