Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add SOS and remote button handling #45

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Conversation

hostcc
Copy link
Owner

@hostcc hostcc commented Dec 16, 2024

  • 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 methods on_sos and on_remote_button_press were added to the class

  • G90History now correctly handles events associated with SOS and remote button presses

  • G90Alarm now has user-visible callbacks for SOS and remote button presses, with two new properties to set the callbacks, sos_callback and remote_button_press_callback, respecitvely.

    The on_sos callaback invokes the on_alarm callback as well, since the SOS
    is treated as an alarm. Also, on_remote_button_press is invoked for the remote
    under SOS condition, so that the callback is called for all remote buttons including
    SOS.

    The on_remote_button_press one also invokes the on_sensor_activity callback,
    since the remote is treated as a special type of sensor.

Should help to resolve hostcc/hass-gs-alarm#49

* `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 methods `on_sos` and
  `on_remote_button_press` were added to the class
* `G90History` now correctly handles events associated with SOS and remote
  button presses
* `G90Alarm` now has user-visible callbacks for SOS and remote button presses,
   with two new properties to set the callbacks, `sos_callback` and `remote_button_press_callback`,
   respecitvely.

   The `on_sos` callaback invokes the `on_alarm` callback as well, since the SOS
   is treated as an alarm. Also, `on_remote_button_press` is invoked for the remote
   under SOS condition, so that the callback is called for all remote buttons including
   SOS.

   The `on_remote_button_press` one also invokes the `on_sensor_activity` callback,
   since the remote is treated as a special type of sensor.
@hostcc hostcc added the enhancement New feature or request label Dec 16, 2024
@hostcc hostcc self-assigned this Dec 16, 2024
@hostcc hostcc merged commit 2aa97ea into master Dec 16, 2024
11 checks passed
@hostcc hostcc deleted the feat/sos-handling branch December 16, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with simulated notifications
1 participant