Aiohomekit

Latest version: v3.1.5

Safety actively analyzes 640762 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 33 of 36

0.2.28

This release adds a helper for building `put_characteristic` payloads. It takes a mapping of characteristic type against value and works out the (aid, iid) values:

python
name = "Hue dimmer switch button 3"
a = Accessories.from_file("tests/fixtures/hue_bridge.json").aid(6623462389072572)

service = a.services.first(
service_type=ServicesTypes.STATELESS_PROGRAMMABLE_SWITCH,
characteristics={CharacteristicsTypes.NAME: name},
)

payload = service.build_update({CharacteristicsTypes.NAME: "Fred"})

payload == [(6623462389072572, 588410716196, "Fred")]

0.2.27

This release adds a filter to `services.characteristics` - useful for iterating over a subset of characteristics:

python
name = "Hue dimmer switch button 3"

a = Accessories.from_file("tests/fixtures/hue_bridge.json").aid(6623462389072572)

service = a.services.first(
service_type=ServicesTypes.STATELESS_PROGRAMMABLE_SWITCH,
characteristics={CharacteristicsTypes.NAME: name},
)

char = service.characteristics.first(char_types=[CharacteristicsTypes.NAME])

assert char.value == name

0.2.26

* This release ditches the dependencies on `hkdf` and `ed25519` as both are available in the `cryptography` library. Additionally the ChaCha20Poly1305 code now uses `cryptography` instead of including its own pure python implementation.

* It adds the `type_name` property to `Characteristic` and `Service`

* It adds some helpers to `Accessory` for reading the accessory information attributes like `Acccessory.manufacturer`

0.2.25

This release fixes round-tripping the `valid-values` field.

0.2.24

This release adds a `value()` operator for looking up a characteristic value:

python
a = Accessories.from_file("tests/fixtures/hue_bridge.json").aid(6623462389072572)

buttons = a.services.filter(
service_type=ServicesTypes.STATELESS_PROGRAMMABLE_SWITCH,
order_by=(CharacteristicsTypes.SERVICE_LABEL_INDEX, CharacteristicsTypes.NAME),
)

assert buttons[0].value(CharacteristicsTypes.SERVICE_LABEL_INDEX) == 1


* Adds an `order_by` kwarg to `services.filter` for returning the list ordered one or more child characteristics (see above example)

* Adds a `InputEventValues` enum.

0.2.23

None

Page 33 of 36

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.