2023-06-28 19:02:11 +02:00
|
|
|
from typing import Dict, Any
|
|
|
|
|
2023-05-29 18:58:50 +02:00
|
|
|
from pyhon.appliances.base import ApplianceBase
|
2023-05-28 06:17:43 +02:00
|
|
|
|
|
|
|
|
2023-05-29 18:58:50 +02:00
|
|
|
class Appliance(ApplianceBase):
|
2023-06-28 19:02:11 +02:00
|
|
|
def attributes(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
2023-06-08 19:50:56 +02:00
|
|
|
data = super().attributes(data)
|
|
|
|
if data["parameters"]["holidayMode"] == "1":
|
2023-05-28 06:17:43 +02:00
|
|
|
data["modeZ1"] = "holiday"
|
2023-06-08 19:50:56 +02:00
|
|
|
elif data["parameters"]["intelligenceMode"] == "1":
|
2023-05-28 06:17:43 +02:00
|
|
|
data["modeZ1"] = "auto_set"
|
2023-07-19 23:55:37 +02:00
|
|
|
elif data["parameters"].get("quickModeZ1") == "1":
|
2023-05-28 06:17:43 +02:00
|
|
|
data["modeZ1"] = "super_cool"
|
|
|
|
else:
|
|
|
|
data["modeZ1"] = "no_mode"
|
|
|
|
|
2023-07-19 23:55:37 +02:00
|
|
|
if data["parameters"].get("quickModeZ2") == "1":
|
2023-05-28 06:17:43 +02:00
|
|
|
data["modeZ2"] = "super_freeze"
|
2023-06-08 19:50:56 +02:00
|
|
|
elif data["parameters"]["intelligenceMode"] == "1":
|
2023-05-28 06:17:43 +02:00
|
|
|
data["modeZ2"] = "auto_set"
|
|
|
|
else:
|
|
|
|
data["modeZ2"] = "no_mode"
|
|
|
|
|
|
|
|
return data
|