|
32 | 32 | HolidayTimer,
|
33 | 33 | OperationMode,
|
34 | 34 | OperationStatus,
|
| 35 | + PowerfulTime, |
35 | 36 | QuietMode,
|
36 | 37 | SensorMode,
|
37 | 38 | Tank,
|
@@ -346,6 +347,7 @@ async def get_device_status(self, long_id: str) -> DeviceStatus:
|
346 | 347 | force_dhw=ForceDHW(device.get("forceDHW", 0)),
|
347 | 348 | force_heater=ForceHeater(device.get("forceHeater", 0)),
|
348 | 349 | holiday_timer=HolidayTimer(device.get("holidayTimer", 0)),
|
| 350 | + powerful_time=PowerfulTime(device.get("powerful", 0)), |
349 | 351 | )
|
350 | 352 |
|
351 | 353 | return device_status
|
@@ -604,6 +606,28 @@ async def post_device_request_defrost(self, long_id: str) -> None:
|
604 | 606 | json=data,
|
605 | 607 | )
|
606 | 608 |
|
| 609 | + @auth_required |
| 610 | + async def post_device_set_powerful_time( |
| 611 | + self, long_id: str, powerful_time: PowerfulTime |
| 612 | + ) -> None: |
| 613 | + """Post powerful time.""" |
| 614 | + data = { |
| 615 | + "status": [ |
| 616 | + { |
| 617 | + "deviceGuid": long_id, |
| 618 | + "powerfulRequest": powerful_time.value, |
| 619 | + } |
| 620 | + ] |
| 621 | + } |
| 622 | + |
| 623 | + response = await self.request( |
| 624 | + "POST", |
| 625 | + f"{AQUAREA_SERVICE_DEVICES}/{long_id}", |
| 626 | + referer=AQUAREA_SERVICE_A2W_STATUS_DISPLAY, |
| 627 | + content_type="application/json", |
| 628 | + json=data, |
| 629 | + ) |
| 630 | + |
607 | 631 | async def get_device_consumption(
|
608 | 632 | self, long_id: str, aggregation: DateType, date_input: str
|
609 | 633 | ) -> Consumption:
|
@@ -819,9 +843,19 @@ async def request_defrost(self) -> None:
|
819 | 843 | await self._client.post_device_request_defrost(self.long_id)
|
820 | 844 |
|
821 | 845 | async def set_holiday_timer(self, holiday_timer: HolidayTimer) -> None:
|
822 |
| - """Enables or disables the holiday timer mode. |
| 846 | + """Enable or disable the holiday timer mode. |
823 | 847 |
|
824 | 848 | :param holiday_timer: The holiday timer option
|
825 | 849 | """
|
826 | 850 | if self.holiday_timer is not holiday_timer:
|
827 | 851 | await self._client.post_device_holiday_timer(self.long_id, holiday_timer)
|
| 852 | + |
| 853 | + async def set_powerful_time(self, powerful_time: PowerfulTime) -> None: |
| 854 | + """Set the powerful time. |
| 855 | +
|
| 856 | + :param powerful_time: Time to enable powerful mode |
| 857 | + """ |
| 858 | + if self.powerful_time is not powerful_time: |
| 859 | + await self._client.post_device_set_powerful_time( |
| 860 | + self.long_id, powerful_time |
| 861 | + ) |
0 commit comments