Skip to content

Commit

Permalink
moving things from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
zweckj committed Nov 22, 2023
1 parent a94f75a commit f2a4472
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions pyacaia_async/acaiascale.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f2a4472

Please sign in to comment.