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(service): add update_state service to force alarm updates #165

Merged
merged 1 commit into from
May 31, 2024

Conversation

palazzem
Copy link
Owner

@palazzem palazzem commented May 20, 2024

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

  • Related issues and proposed changes are filled
  • Tests are defining the correct and expected behavior
  • Code is well-documented via docstrings

@palazzem palazzem added this to the 2.4.0 milestone May 20, 2024
@palazzem palazzem self-assigned this May 20, 2024
@coveralls
Copy link

coveralls commented May 20, 2024

Pull Request Test Coverage Report for Build 9319499272

Details

  • 7 of 8 (87.5%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 91.785%

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

💛 - Coveralls

@palazzem palazzem merged commit d334560 into main May 31, 2024
4 of 5 checks passed
@palazzem palazzem deleted the palazzem/feature-160 branch May 31, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add a button to force-update the state
2 participants