Fix Frient EMI LED divisor and multiplier #4485
Draft
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.
For testing, see the comment below this one.
Proposed change
This PR sets the divisor and multiplier to fixed values to avoid possible conflicts with the
interface_modemanufacturer specific attribute (0x0302, same asdivisorThis PR is just for testing. On the HA forum, it was observed that the EMI LED shoots to random values for the
instantaneous_demandabout once a month. This is just a shot in the dark to see if this would fix that.See:
https://community.home-assistant.io/t/frient-joins-works-with-home-assistant/926758/63?u=thejulianjes
Additional information
This is similar to the implementation done for the Frient HAN EMI:
Tests are expected to fail for now. Apparently just using the
CustomClustercauses the existing EMI LED tests to fail.I'll fix them before this PR is merged (if at all).
BASED ON (below should to be merged first):
Device diagnostics
Checklist
pre-commitchecks pass / the code has been formatted using Black