From f2a44725996eece32e8c604d9630b671d99ba41f Mon Sep 17 00:00:00 2001 From: Josef Zweck <24647999+zweckj@users.noreply.github.com> Date: Wed, 22 Nov 2023 08:54:40 +0100 Subject: [PATCH] moving things from upstream --- pyacaia_async/acaiascale.py | 26 ++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/pyacaia_async/acaiascale.py b/pyacaia_async/acaiascale.py index 46ac8d4..3f44872 100644 --- a/pyacaia_async/acaiascale.py +++ b/pyacaia_async/acaiascale.py @@ -58,6 +58,32 @@ def __init__(self, mac: str | None = None, is_new_style_scale: bool = True) -> N # for old style scales, the default char id is the same as the notify char id self._default_char_id = self._notify_char_id = OLD_STYLE_CHAR_ID + @property + def mac(self) -> str: + """Return the mac address of the scale in upper case.""" + assert self._mac + return self._mac.upper() + + @property + def timer_running(self) -> bool: + """Return whether the timer is running.""" + return self._timer_running + + @timer_running.setter + def timer_running(self, value: bool) -> None: + """Set timer running state.""" + self._timer_running = value + + @property + def connected(self) -> bool: + """Return whether the scale is connected.""" + return self._connected + + @connected.setter + def connected(self, value: bool) -> None: + """Set connected state.""" + self._connected = value + @classmethod async def create( cls, diff --git a/setup.py b/setup.py index 8441ba6..1862606 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pyacaia_async", - version="0.0.11b1", + version="0.0.11b2", description="An async implementation of PyAcaia", long_description=readme, long_description_content_type="text/markdown",