Releases: hostcc/pyg90alarm
2.2.0
What's Changed
- @hostcc in #57: Support for sensor and device registration
-
Added support for registering sensors and devices with the G90 alarm panel. Sensor registration utilizes notifications the panel sends when a new sensor is added and refreshes the list of sensors to reflect the change. Contrary, the device registration does not have an associated panel's notification, hence uses polling to check when new device is added.
-
Sensor and device definitions are now split into
G90SensorDefinitions
andG90DeviceDefinitions
classes, to distinguish between those. -
❗ Breaking change:
G90SensorTypes
has been renamed toG90PeripheralTypes
, since it is now used for both sensor and device definitions. -
Two more callbacks have been added to
G90Alarm
-sensor_list_change_callback
anddevice_list_change_callback
, which are invoked when sensor or device list changes, respectively. Please notes those are generated by the package internally, and may not have associated panel's notifications -
❗ Breaking change: All user-visible callbacks of
G90Alarm
andG90Sensor
classes are now
instances ofG90CallbackList
class, which allows for multiple callbacks for the same event.For compatibility reasons the properties to set such callbacks add the value to the callback list internally. Alternatively, the return values from the properties could be used to access methods of underlying
G90CallbackList
class - for example,G90Alarm(...).sensor_callback.add(callback)
orG90Alarm(...).sensor_callback.remove(callback)
methods could be used to add or remove the callback, respectively -
G90BaseCommand
now handles failures and errors if reported by the panel
-
Full Changelog: 2.1.1...2.2.0