mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-22 02:45:10 -04:00
Add and improve fridge
This commit is contained in:
parent
eea79e28b9
commit
7c6ac15901
7 changed files with 47 additions and 5 deletions
28
pyhon/appliances/ref.py
Normal file
28
pyhon/appliances/ref.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
from pyhon.parameter.fixed import HonParameterFixed
|
||||
|
||||
|
||||
class Appliance:
|
||||
def __init__(self, appliance):
|
||||
self.parent = appliance
|
||||
|
||||
def data(self, data):
|
||||
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
|
||||
|
||||
def settings(self, settings):
|
||||
return settings
|
Loading…
Add table
Add a link
Reference in a new issue