2023-05-29 16:58:50 +00:00
|
|
|
class ApplianceBase:
|
|
|
|
def __init__(self, appliance):
|
|
|
|
self.parent = appliance
|
|
|
|
|
2023-06-08 17:50:56 +00:00
|
|
|
def attributes(self, data):
|
2023-05-29 16:58:50 +00:00
|
|
|
program_name = "No Program"
|
2023-06-12 22:12:29 +00:00
|
|
|
if program := int(str(data.get("parameters", {}).get("prCode", "0"))):
|
2023-06-08 17:50:56 +00:00
|
|
|
if start_cmd := self.parent.settings.get("startProgram.program"):
|
|
|
|
if ids := start_cmd.ids:
|
|
|
|
program_name = ids.get(program, program_name)
|
2023-05-29 16:58:50 +00:00
|
|
|
data["programName"] = program_name
|
2023-06-08 17:50:56 +00:00
|
|
|
return data
|
2023-05-29 16:58:50 +00:00
|
|
|
|
|
|
|
def settings(self, settings):
|
|
|
|
return settings
|