mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-27 21:24:15 -04:00
Get program name
This commit is contained in:
parent
a081ef1f97
commit
31c03faca8
10 changed files with 44 additions and 36 deletions
|
@ -1,12 +1,10 @@
|
|||
class Appliance:
|
||||
def __init__(self, appliance):
|
||||
self.parent = appliance
|
||||
from pyhon.appliances.base import ApplianceBase
|
||||
|
||||
|
||||
class Appliance(ApplianceBase):
|
||||
def data(self, data):
|
||||
super().data(data)
|
||||
if data["attributes"]["lastConnEvent"]["category"] == "DISCONNECTED":
|
||||
data["attributes"]["parameters"]["machMode"] = "0"
|
||||
data["active"] = bool(data.get("attributes", {}).get("activity"))
|
||||
return data
|
||||
|
||||
def settings(self, settings):
|
||||
return settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue