pyhOn/pyhon/appliances/ref.py

24 lines
819 B
Python
Raw Permalink Normal View History

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-05-28 06:17:43 +02:00
def data(self, data):
2023-05-29 18:58:50 +02:00
super().data(data)
2023-05-28 06:17:43 +02:00
if data["attributes"]["parameters"]["holidayMode"] == "1":
data["modeZ1"] = "holiday"
elif data["attributes"]["parameters"]["intelligenceMode"] == "1":
data["modeZ1"] = "auto_set"
elif data["attributes"]["parameters"]["quickModeZ1"] == "1":
data["modeZ1"] = "super_cool"
else:
data["modeZ1"] = "no_mode"
if data["attributes"]["parameters"]["quickModeZ2"] == "1":
data["modeZ2"] = "super_freeze"
elif data["attributes"]["parameters"]["intelligenceMode"] == "1":
data["modeZ2"] = "auto_set"
else:
data["modeZ2"] = "no_mode"
return data