Changelog
⚠️ Breaking changes for all users
The `lock` module is renamed into `chsesame2` in https://github.com/mochipon/pysesame3/pull/31. This is a preparation to support new devices, so please bear with me.
Old
python
from pysesame3.lock import CHSesame2
New
python
from pysesame3.chsesame2 import CHSesame2
⚠️ Breaking changes for `CognitoAuth` users
Using `subscribeMechStatus`, you can set a function (callback) to be executed when the lock status changes. In previous releases, device shadows were not handled correctly within `pysesame3` if you set your own callbacks. The issue is fixed at https://github.com/mochipon/pysesame3/pull/27.
From this release, the callback must accept two inputs. The first will be a device object itself and the second will be a latest MechStatus of a device. Please take a look at [the updated example script](https://pysesame3.readthedocs.io/en/stable/usage/#example-usage).
Old
python
def your_callback(client, userdata, message):
...
New
python
def your_callback(device: CHSesame2, status: CHSesame2MechStatus):
...
[v0.4.0](https://github.com/mochipon/pysesame3/tree/v0.4.0) (2021-07-03)
**Fixed bugs:**
- \[Bug\]: `subscribeMechStatus` callback will not be executed [\32](https://github.com/mochipon/pysesame3/issues/32)
- Fix for unexpected \(imcomplete\) device shadow [\33](https://github.com/mochipon/pysesame3/pull/33)
**Merged pull requests:**
- Rename the module: `lock` -\> `chsesame2` [\31](https://github.com/mochipon/pysesame3/pull/31)
- Ensure we have the latest pip version in build environments [\30](https://github.com/mochipon/pysesame3/pull/30)
- Increase test coverage, correct type hints [\29](https://github.com/mochipon/pysesame3/pull/29)
- Modernize issue templates [\28](https://github.com/mochipon/pysesame3/pull/28)
- Support for setting the callback for MechStatus updates [\27](https://github.com/mochipon/pysesame3/pull/27)
- Fix signed value conversion [\26](https://github.com/mochipon/pysesame3/pull/26)
- Update precommit hook pre-commit/mirrors-isort to v5.9.1 [\24](https://github.com/mochipon/pysesame3/pull/24)