palazzem / ha-econnect-alarm

Home Assistant integration that provides a full-fledged Alarm Panel to control your Elmo/IESS alarm systems.
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

feat(service): add `update_state` service to force alarm updates #165

Closed palazzem closed 3 weeks ago

palazzem commented 1 month ago

Related Issues

Proposed Changes:

Add update_state service so that users can trigger a full update manually (through lovelace dashboard) or programmatically (through automations).

Add the Update Button

Add a button in the Lovelace dashboard as follows:

  1. Add a card of type "button".
  2. In "Entity", select your Alarm Panel.
  3. In "Tap Action", select "Call Service".
  4. In "Service", select "e-Connect/Metronet Alarm: Update Alarm State".
  5. Click "Save".

The screenshot below is a configuration example; update it based on your needs:

image

Testing:

Trigger update_state service.

Extra Notes (optional):

n/a

Checklist

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9319499272

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
custom_components/econnect_metronet/init.py 0 1 0.0%
<!-- Total: 7 8 87.5% -->
Totals Coverage Status
Change from base Build 9158476390: -0.04%
Covered Lines: 707
Relevant Lines: 776

💛 - Coveralls