pyhOn/pyhon/appliances/wh.py
Vadym Melnychuk 7ac2908671 formatting
2023-07-11 17:49:49 +03:00

11 lines
304 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