16 lines
530 B
Python
16 lines
530 B
Python
class ApplianceBase:
|
|
def __init__(self, appliance):
|
|
self.parent = appliance
|
|
|
|
def attributes(self, data):
|
|
program_name = "No Program"
|
|
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)
|
|
data["programName"] = program_name
|
|
return data
|
|
|
|
def settings(self, settings):
|
|
return settings
|