Water Heater. Ability to send only mandatory parameters #14

Merged
VadymMelnychuk merged 11 commits from main into main 2023-07-18 21:26:11 +02:00
Showing only changes of commit a9fd05f3f5 - Show all commits

View File

@ -5,4 +5,6 @@ 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.get("onOffStatus") == 1
data["active"] = data["parameters"]["onOffStatus"] == "1"
return data