Improvements for Home Assistant discovery #87
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.