feat: Add SOS and remote button handling #45
Merged
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.
G90DeviceNotifications
now handles both SOS initiated by the panel (host) and from the remote. Also, the class now processes button presses on the remote. To implement the functionality new methodson_sos
andon_remote_button_press
were added to the classG90History
now correctly handles events associated with SOS and remote button pressesG90Alarm
now has user-visible callbacks for SOS and remote button presses, with two new properties to set the callbacks,sos_callback
andremote_button_press_callback
, respecitvely.The
on_sos
callaback invokes theon_alarm
callback as well, since the SOSis treated as an alarm. Also,
on_remote_button_press
is invoked for the remoteunder SOS condition, so that the callback is called for all remote buttons including
SOS.
The
on_remote_button_press
one also invokes theon_sensor_activity
callback,since the remote is treated as a special type of sensor.
Should help to resolve hostcc/hass-gs-alarm#49