feat: Added support for updating sensor/device lists w/o reinstantiating G90Alarm
#52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
G90Alarm.get_sensors()
andG90Alarm.get_devices()
methods now fetch sensor and devices lists from the panel, without need to reinstantiateG90Alarm
. The lists are stable, i.e. entities no longer in the panel are still retained but marked as unavailable (.is_unavailable
property on them will returnFalse
). This functionality also differs from the previous versions, as those methods were caching the lists upon first retrieval, while now those are fetched upon each call to the methods.G90Alarm.sensors
andG90Alarm.devices
properties now return cached version of sensor and device lists, unless those are empty - then the properties will internall fetch those (via methods above, respectively).G90BaseEntity
,G90BaseList
,G90SensorList
andG90DeviceList
classes to support the above functionality.