Improvements for Home Assistant discovery#87
Conversation
|
oh wow, much more organized than myself :P look good at a glance. |
|
hmmmn. so 2 things come to my mind for the display name change. i think this should be user-configurable. this is a bit of a personal preference type of situation. not sure if it's necessary to add an additional self.display_name variable. let me know if your up to make the changes, or i can go for it. ty for contributing. it's a good idea / detail that i didnt notice. |
|
sorry for the delayed reply! I absolutely agree with both your suggestions but will not find time in the next weeks to implement them. Please feel free to modify my PR or I will get back to it when I have the time to go deeper into your code. |
Display Name
Added display_name to allow displaying original variable name / documented name in Home Assistant

Before: Devices were displayed e.g. as
ac_discharge_wattsRelated Commits
Device Serial
If serial number is auto discovered and not provided in configuration, it was not updated in the device dict and therefore not available in Home Assistant.

Also, the device name in Home Assistant was shown with "_" separation, would also allow space for nicer displaying.
Now:
Before:
Growatt_Related Commits
Model Number
Device model number has not been parsed from configuration and was not displayed in Home Assistant.

Now (if
modelavailable inconfig.cfg, heremodel = SPF6000 ES Plus):Related Commits
Redundant Name Cleaning
Name cleaning is already done in
PythonProtocolGateway/classes/protocol_settings.py
Line 504 in 86b7e64
mqtt.pyin 7ce4c43.Add Attribute for
availability_topicAvailability topic in offline message was not matching topic in online message:
Offline:
PythonProtocolGateway/classes/transports/mqtt.py
Line 111 in 86b7e64
Online:
PythonProtocolGateway/classes/transports/mqtt.py
Line 164 in 86b7e64
Added one common availability topic in 1683c96.
Thanks in advance for considering my changes.