2023-05-29 22:28:50 +05:30
|
|
|
class ApplianceBase:
|
|
|
|
def __init__(self, appliance):
|
|
|
|
self.parent = appliance
|
|
|
|
|
2023-06-08 23:20:56 +05:30
|
|
|
def attributes(self, data):
|
2023-05-29 22:28:50 +05:30
|
|
|
program_name = "No Program"
|
2023-06-08 23:20:56 +05:30
|
|
|
if program := int(data["parameters"].get("prCode", "0")):
|
|
|
|
if start_cmd := self.parent.settings.get("startProgram.program"):
|
|
|
|
if ids := start_cmd.ids:
|
|
|
|
program_name = ids.get(program, program_name)
|
2023-05-29 22:28:50 +05:30
|
|
|
data["programName"] = program_name
|
2023-06-08 23:20:56 +05:30
|
|
|
return data
|
2023-05-29 22:28:50 +05:30
|
|
|
|
|
|
|
def settings(self, settings):
|
|
|
|
return settings
|