2023-04-07 20:06:36 -06:00
|
|
|
from pyhon.parameter import HonParameterEnum
|
|
|
|
|
|
|
|
|
|
|
|
class Appliance:
|
|
|
|
def __init__(self):
|
|
|
|
filters = ["receipt", "standard, special"]
|
|
|
|
data = {'defaultValue': filters[0], 'enumValues': filters}
|
|
|
|
self._program_filter = HonParameterEnum("program_filter", data)
|
|
|
|
|
|
|
|
def data(self, data):
|
2023-04-08 14:24:14 -06:00
|
|
|
if data["attributes"]["lastConnEvent"]["category"] == "DISCONNECTED":
|
|
|
|
data["attributes"]["activity"]["attributes"]["temp"] = "0"
|
|
|
|
data["attributes"]["activity"]["attributes"]["onOffStatus"] = "0"
|
|
|
|
data["attributes"]["activity"]["attributes"]["remoteCtrValid"] = "0"
|
|
|
|
data["attributes"]["activity"]["attributes"]["remainingTimeMM"] = "0"
|
|
|
|
|
2023-04-07 20:06:36 -06:00
|
|
|
return data
|
|
|
|
|
|
|
|
def settings(self, settings):
|
|
|
|
settings["program_filter"] = self._program_filter
|
|
|
|
settings["startProgram.program"].filter = self._program_filter.value
|
|
|
|
return settings
|