fix(river2): support River 2 family telemetry and offline states#769
Open
Komzpa wants to merge 3 commits into
Open
fix(river2): support River 2 family telemetry and offline states#769Komzpa wants to merge 3 commits into
Komzpa wants to merge 3 commits into
Conversation
043764c to
cf9c90a
Compare
b71da33 to
67c59cf
Compare
67c59cf to
4623aaf
Compare
1b582ca to
f474012
Compare
Contributor
Author
|
@tolwi running this one for a while already, solar voltage/current fix from here is really handy - anything else I need to fix here before merging? |
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.

Summary
This PR narrows the remaining River 2 work to device-family telemetry and
offline-state handling.
It is now rebased on current
main, after the MQTT reconnect/status-id fixesfrom #787 and #789. Those fixes are intentionally not duplicated here. This PR
does not replace the MQTT client; it keeps the upstream MQTT path from
main.What changes
mppt.*telemetry while preserving the existing
inv.dcIn*entity IDs.Reconnectbutton while keepingdevice-specific buttons.
totalfor Home Assistant Energycompatibility.
reporting stale/default
0values./device/liststatus-poll results into per-device coordinators soexplicit offline status updates HA availability.
Notes for review
ASSUME_OFFLINEremains a soft "silent for now" state; only explicitOFFLINEhides telemetry.entity_keypreserves the oldinv.dcIn*unique IDs while values are sourced frommppt.*.Validation
python3 -m ruff check custom_components/ecoflow_cloud/api/ecoflow_mqtt.py custom_components/ecoflow_cloud/api/__init__.py custom_components/ecoflow_cloud/devices/data_holder.py custom_components/ecoflow_cloud/devices/status_coordinator.py custom_components/ecoflow_cloud/entities/__init__.py custom_components/ecoflow_cloud/sensor.py custom_components/ecoflow_cloud/devices/internal/river2.py custom_components/ecoflow_cloud/devices/internal/river2_max.py custom_components/ecoflow_cloud/devices/internal/river2_pro.pypython3 -m py_compile custom_components/ecoflow_cloud/api/ecoflow_mqtt.py custom_components/ecoflow_cloud/api/__init__.py custom_components/ecoflow_cloud/devices/data_holder.py custom_components/ecoflow_cloud/devices/status_coordinator.py custom_components/ecoflow_cloud/entities/__init__.py custom_components/ecoflow_cloud/sensor.py custom_components/ecoflow_cloud/devices/internal/river2.py custom_components/ecoflow_cloud/devices/internal/river2_max.py custom_components/ecoflow_cloud/devices/internal/river2_pro.pygit diff --checkhassfest validation.