Logo
Explore Help
Sign In
Mirrors/pyhOn
2
0
Fork 0
You've already forked pyhOn
Code Issues Pull Requests Packages Projects Releases Wiki Activity
pyhOn/pyhon/appliances/wh.py

12 lines
305 B
Python
Raw Normal View History

Water Heater. Ability to send only mandatory parameters (#14) * Added water heater appliance. Added ability to send only mandatory parameters * fixed build * formatting * cleanup * cleanup * reformatting * Added ability to send specific parameters. Useful in case the command has many not mandatory parameters and you want to send only one/few * cleanup * Fixed code style --------- Co-authored-by: Vadym Melnychuk <vme@primexm.com>
2023-07-18 22:26:11 +03:00
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
Reference in New Issue Copy Permalink
Powered by Gitea
English
Deutsch English español français italiano latviešu Nederlands polski português do Brasil suomi svenska Türkçe čeština български русский српски Українська 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API