2023-05-29 18:58:50 +02:00
|
|
|
from pyhon.appliances.base import ApplianceBase
|
2023-04-23 21:42:44 +02:00
|
|
|
|
2023-05-29 18:58:50 +02:00
|
|
|
|
|
|
|
class Appliance(ApplianceBase):
|
2023-06-08 19:50:56 +02:00
|
|
|
def attributes(self, data):
|
|
|
|
data = super().attributes(data)
|
|
|
|
if data["lastConnEvent"]["category"] == "DISCONNECTED":
|
|
|
|
data["parameters"]["machMode"] = "0"
|
|
|
|
data["active"] = bool(data.get("activity"))
|
2023-04-16 02:46:30 +02:00
|
|
|
return data
|