mirror of
https://github.com/Andre0512/pyhOn.git
synced 2026-06-24 15:41:52 +02:00
Handle mqtt connection events
This commit is contained in:
@@ -8,7 +8,7 @@ from pyhon.parameter.fixed import HonParameterFixed
|
||||
class Appliance(ApplianceBase):
|
||||
def attributes(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
||||
data = super().attributes(data)
|
||||
if data.get("lastConnEvent", {}).get("category", "") == "DISCONNECTED":
|
||||
if not self.parent.connection:
|
||||
data["parameters"]["machMode"].value = "0"
|
||||
data["active"] = bool(data.get("activity"))
|
||||
data["pause"] = data["parameters"]["machMode"] == "3"
|
||||
|
||||
Reference in New Issue
Block a user