mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-13 06:34:25 -04:00
Improve update performance
This commit is contained in:
parent
38d09e2ef5
commit
7b51caecca
10 changed files with 63 additions and 49 deletions
|
@ -2,20 +2,20 @@ from pyhon.appliances.base import ApplianceBase
|
|||
|
||||
|
||||
class Appliance(ApplianceBase):
|
||||
def data(self, data):
|
||||
super().data(data)
|
||||
if data["attributes"]["parameters"]["holidayMode"] == "1":
|
||||
def attributes(self, data):
|
||||
data = super().attributes(data)
|
||||
if data["parameters"]["holidayMode"] == "1":
|
||||
data["modeZ1"] = "holiday"
|
||||
elif data["attributes"]["parameters"]["intelligenceMode"] == "1":
|
||||
elif data["parameters"]["intelligenceMode"] == "1":
|
||||
data["modeZ1"] = "auto_set"
|
||||
elif data["attributes"]["parameters"]["quickModeZ1"] == "1":
|
||||
elif data["parameters"]["quickModeZ1"] == "1":
|
||||
data["modeZ1"] = "super_cool"
|
||||
else:
|
||||
data["modeZ1"] = "no_mode"
|
||||
|
||||
if data["attributes"]["parameters"]["quickModeZ2"] == "1":
|
||||
if data["parameters"]["quickModeZ2"] == "1":
|
||||
data["modeZ2"] = "super_freeze"
|
||||
elif data["attributes"]["parameters"]["intelligenceMode"] == "1":
|
||||
elif data["parameters"]["intelligenceMode"] == "1":
|
||||
data["modeZ2"] = "auto_set"
|
||||
else:
|
||||
data["modeZ2"] = "no_mode"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue