pyhOn/pyhon/appliances/wh.py
Vadym Melnychuk a17692940b cleanup
2023-07-11 18:38:49 +03:00

12 lines
305 B
Python

from typing import Any, Dict
from pyhon.appliances.base import ApplianceBase
class Appliance(ApplianceBase):
def attributes(self, data: Dict[str, Any]) -> Dict[str, Any]:
data = super().attributes(data)
data["active"] = data["parameters"]["onOffStatus"] == "1"
return data