mirror of
https://github.com/Andre0512/pyhOn.git
synced 2024-01-19 02:50:44 +00:00
14 lines
467 B
Python
14 lines
467 B
Python
class ApplianceBase:
|
|
def __init__(self, appliance):
|
|
self.parent = appliance
|
|
|
|
def data(self, data):
|
|
program_name = "No Program"
|
|
if program := int(data["attributes"]["parameters"].get("prCode", "0")):
|
|
if ids := self.parent.settings["startProgram.program"].ids:
|
|
program_name = ids.get(program, program_name)
|
|
data["programName"] = program_name
|
|
|
|
def settings(self, settings):
|
|
return settings
|