pyhOn/pyhon/appliances/wh.py

12 lines
305 B
Python
Raw Normal View History

from typing import Any, Dict
from pyhon.appliances.base import ApplianceBase
2023-07-11 17:38:49 +02:00
class Appliance(ApplianceBase):
def attributes(self, data: Dict[str, Any]) -> Dict[str, Any]:
data = super().attributes(data)
2023-07-11 16:40:04 +02:00
data["active"] = data["parameters"]["onOffStatus"] == "1"
2023-07-11 16:49:49 +02:00
return data