From a1618bb18a7885e6015db2e70065da3c18910739 Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Sat, 15 Apr 2023 22:25:34 +0200 Subject: [PATCH] Fix missing zone attribute --- .gitignore | 1 + README.md | 2 +- pyhon/appliance.py | 6 +++++- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6440f3c..078d48e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ __pycache__/ dist/ **/*.egg-info/ test* +build/ diff --git a/README.md b/README.md index cba6f50..b999d02 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyhOn)](https://www.python.org/) [![PyPI - License](https://img.shields.io/pypi/l/pyhOn)](https://github.com/Andre0512/pyhOn/blob/main/LICENSE) [![PyPI - Downloads](https://img.shields.io/pypi/dm/pyhOn)](https://pypistats.org/packages/pyhon) -Control your Haier appliances with python! +Control your Haier, Candy and Hoover appliances with python! The idea behind this library is, to make the use of all available commands as simple as possible. ## Installation diff --git a/pyhon/appliance.py b/pyhon/appliance.py index 0549a2e..297f87e 100644 --- a/pyhon/appliance.py +++ b/pyhon/appliance.py @@ -24,7 +24,7 @@ class HonAppliance: self._commands: Dict = {} self._statistics: Dict = {} self._attributes: Dict = {} - self._zone = zone + self._zone: int = zone try: self._extra = importlib.import_module( @@ -106,6 +106,10 @@ class HonAppliance: def info(self): return self._info + @property + def zone(self) -> int: + return self._zone + async def _recover_last_command_states(self, commands): command_history = await self._api.command_history(self) for name, command in commands.items(): diff --git a/setup.py b/setup.py index 6eaa2fa..caa5d11 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open("README.md", "r") as f: setup( name="pyhOn", - version="0.8.0b3", + version="0.8.0b4", author="Andre Basche", description="Control hOn devices with python", long_description=long_description,