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(experimental): add managed sectors to control only part of available areas #146

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

palazzem
Copy link
Owner

@palazzem palazzem commented Feb 17, 2024

Related Issues

n/a

Proposed Changes:

Provides an internal configuration to manage only a subset of possible sectors. This is useful if the alarm panel should not take into consideration some sectors, meaning it will consider itself "Disarmed" even if some sectors are activated.

WARNING: This change is experimental, meaning it will be removed without deprecation notice.

Usage

Add the following to your configuration.yaml:

econnect_metronet:
  experimental:
    managed_sectors: [1, 2, 4]

Note that [1, 2, 4] must always be a list, and it must match the number of your sectors. An empty list, or a missing configuration, means that all sectors are managed.

Testing:

Add the configuration as described above. You should see some sectors "Unavailable".

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.3.0 milestone Feb 17, 2024
@palazzem palazzem self-assigned this Feb 17, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 7942825999

Details

  • -2 of 6 (66.67%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.07%) to 93.803%

Changes Missing Coverage Covered Lines Changed/Added Lines %
custom_components/econnect_metronet/init.py 0 2 0.0%
Totals Coverage Status
Change from base Build 7942678110: -0.07%
Covered Lines: 655
Relevant Lines: 702

💛 - Coveralls

@palazzem
Copy link
Owner Author

This change is expected to not have coverage as the setup entry step is not tested right now.

@palazzem palazzem merged commit 52e1d74 into main Feb 17, 2024
4 of 5 checks passed
@palazzem palazzem deleted the palazzem/limited-control branch February 17, 2024 16:12
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.

2 participants