Skip to content

Commit

Permalink
Fix set_capacity_control_periods service. (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericMa authored Jun 22, 2024
1 parent eccb6aa commit d204d58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def _parse_periods(text) -> list[PeakSettingPeriod]:
)
return result

bridge = get_battery_bridge(hass, service_call)
bridge, uc = get_battery_bridge(hass, service_call)

if not re.fullmatch(
CAPACITY_CONTROL_PERIODS_PATTERN, service_call.data[DATA_PERIODS]
Expand All @@ -577,6 +577,8 @@ def _parse_periods(text) -> list[PeakSettingPeriod]:
_parse_periods(service_call.data[DATA_PERIODS]),
)

await uc.async_refresh()


async def set_fixed_charge_periods(
hass: HomeAssistant, service_call: ServiceCall
Expand Down

0 comments on commit d204d58

Please sign in to comment.