mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-19 17:35:08 -04:00
Use class for attributes
This commit is contained in:
parent
310d1bafd7
commit
f6139db0b5
10 changed files with 61 additions and 19 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue