-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
custom_components/ecoflow_cloud/devices/public/river2_pro.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from .data_bridge import to_plain | ||
from ..internal.river2_pro import River2Pro as InternalRiver2Pro | ||
from ...api import EcoflowApiClient | ||
from ...sensor import StatusSensorEntity | ||
|
||
|
||
class River2Pro(InternalRiver2Pro): | ||
|
||
def _prepare_data(self, raw_data) -> dict[str, any]: | ||
res = super()._prepare_data(raw_data) | ||
res = to_plain(res) | ||
return res | ||
|
||
def _status_sensor(self, client: EcoflowApiClient) -> StatusSensorEntity: | ||
return StatusSensorEntity(client, self) |
This file contains 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