mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-21 02:15:09 -04:00
Get program name
This commit is contained in:
parent
a081ef1f97
commit
31c03faca8
10 changed files with 44 additions and 36 deletions
13
pyhon/appliances/base.py
Normal file
13
pyhon/appliances/base.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue