Use class for attributes
This commit is contained in:
@@ -4,7 +4,7 @@ class ApplianceBase:
|
||||
|
||||
def attributes(self, data):
|
||||
program_name = "No Program"
|
||||
if program := int(data["parameters"].get("prCode", "0")):
|
||||
if program := int(str(data.get("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)
|
||||
|
||||
Reference in New Issue
Block a user