Add 4148 and 4152 - #2
Open
notnerb84 wants to merge 3 commits into
Open
Conversation
In case this breaks something, here's my full diff:
$ sudo diff ha_midnite_classic/ha_midnite_classic-main/custom_components/ha_midnite_classic /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic
Common subdirectories: ha_midnite_classic/ha_midnite_classic-main/custom_components/ha_midnite_classic/brand and /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic/brand
diff ha_midnite_classic/ha_midnite_classic-main/custom_components/ha_midnite_classic/classic_modbusdecoder.py /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic/classic_modbusdecoder.py
114c114
< elif addr == 4148:
---
> elif addr == 4147:
116a117
> ("BatteryOutputCurrentLimit", decoder.decode_16bit_int() / 10.0), # 4148
119a121
> ("SlidingCurrentLimit", decoder.decode_16bit_int() / 10.0), # 4152
224c226
< raw[4148] = _readRegisters(client, 4148, 3)
---
> raw[4147] = _readRegisters(client, 4147, 5)
diff ha_midnite_classic/ha_midnite_classic-main/custom_components/ha_midnite_classic/const.py /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic/const.py
98a99,101
> # Added by notnerb84
> "BatteryOutputCurrentLimit": ("Battery output Current Limit", "A", "current", "measurement", "mdi:current-dc", 1, True, 10.0, 88.0, 0.1, 10),
> "SlidingCurrentLimit": ("Sliding Current Limit", "A", "current", "measurement", "mdi:current-dc", 0, False, None, None, None, None),
113a117
> "BatteryOutputCurrentLimit": 4148,
141c145
< COORDINATOR = "coordinator"
\ No newline at end of file
---
> COORDINATOR = "coordinator"
Only in /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic: __pycache__
Common subdirectories: ha_midnite_classic/ha_midnite_classic-main/custom_components/ha_midnite_classic/translations and /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic/translations
Update for 4148 and 4152
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In case this breaks something, here's my full diff:
`$ sudo diff ha_midnite_classic/ha_midnite_classic-main/custom_components/ha_midnite_classic /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic
Common subdirectories: ha_midnite_classic/ha_midnite_classic-main/custom_components/ha_midnite_classic/brand and /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic/brand
diff ha_midnite_classic/ha_midnite_classic-main/custom_components/ha_midnite_classic/classic_modbusdecoder.py /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic/classic_modbusdecoder.py
114c114
< elif addr == 4148:
116a117
119a121
224c226
< raw[4148] = _readRegisters(client, 4148, 3)
diff ha_midnite_classic/ha_midnite_classic-main/custom_components/ha_midnite_classic/const.py /home/homeassistant/.homeassistant/custom_components/ha_midnite_classic/const.py
98a99,101
113a117
141c145
< COORDINATOR = "coordinator"
\ No newline at end of file