Skip to content

Commit

Permalink
fixed the enable/disable for Power Reserve on Delta Pro (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
knyghtryda authored Aug 9, 2023
1 parent a5b41d1 commit c506e33
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions custom_components/ecoflow_cloud/devices/delta_pro.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,13 @@ def switches(self, client: EcoflowMQTTClient) -> list[BaseSwitchEntity]:

EnabledEntity(client, "inv.cfgAcXboost", const.XBOOST_ENABLED,
lambda value: {"moduleType": 0, "operateType": "TCP", "params": {"id": 66, "xboost": value}}),

EnabledEntity(client, "pd.acautooutConfig", const.AC_ALWAYS_ENABLED,
lambda value: {"moduleType": 0, "operateType": "TCP", "params": {"id": 95, "acautooutConfig": value}}),
EnabledEntity(client, "pd.bpPowerSoc", const.BP_ENABLED,
lambda value: {"moduleType": 0, "operateType": "TCP", "params": {"isConfig": value}}),
EnabledEntity(client, "pd.bppowerSoc", const.BP_ENABLED,
lambda value, params: {"moduleType": 0, "operateType": "TCP", "params": {"id": 94, "isConfig": value,
"bpPowerSoc": int(params["pd.bppowerSoc"]),
"minDsgSoc": 0,
"maxChgSoc": 0}}),
]

def selects(self, client: EcoflowMQTTClient) -> list[BaseSelectEntity]:
Expand Down

0 comments on commit c506e33

Please sign in to comment.