pyhOn/pyhon/appliances/ref.py

24 lines
768 B
Python
Raw Normal View History

2023-05-29 16:58:50 +00:00
from pyhon.appliances.base import ApplianceBase
2023-05-28 04:17:43 +00:00
2023-05-29 16:58:50 +00:00
class Appliance(ApplianceBase):
2023-06-08 17:50:56 +00:00
def attributes(self, data):
data = super().attributes(data)
if data["parameters"]["holidayMode"] == "1":
2023-05-28 04:17:43 +00:00
data["modeZ1"] = "holiday"
2023-06-08 17:50:56 +00:00
elif data["parameters"]["intelligenceMode"] == "1":
2023-05-28 04:17:43 +00:00
data["modeZ1"] = "auto_set"
2023-06-08 17:50:56 +00:00
elif data["parameters"]["quickModeZ1"] == "1":
2023-05-28 04:17:43 +00:00
data["modeZ1"] = "super_cool"
else:
data["modeZ1"] = "no_mode"
2023-06-08 17:50:56 +00:00
if data["parameters"]["quickModeZ2"] == "1":
2023-05-28 04:17:43 +00:00
data["modeZ2"] = "super_freeze"
2023-06-08 17:50:56 +00:00
elif data["parameters"]["intelligenceMode"] == "1":
2023-05-28 04:17:43 +00:00
data["modeZ2"] = "auto_set"
else:
data["modeZ2"] = "no_mode"
return data