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(entity): add connection status binary sensor to provide feedback in case of a disconnection #151

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

palazzem
Copy link
Owner

@palazzem palazzem commented Mar 1, 2024

Related Issues

Proposed Changes:

This change adds a binary sensor as a feedback mechanism in case the device is not connected to the Cloud API. You can use it to know if the state that you see is up to date, to trigger automations, to send notifications.

Example:
image

Testing:

  1. Add the binary sensor to your dashboard.
  2. The sensor should be off in case of connection.
  3. Disconnect your main unit (device).
  4. The sensor should be triggered.

Extra Notes (optional):

This is a follow-up PR for #148. With both changes, we keep the previous state in case of disconnection to avoid triggering unwanted automations, but at the same time we provide a good feedback mechanism.

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 Mar 1, 2024
@palazzem palazzem self-assigned this Mar 1, 2024
@coveralls
Copy link

coveralls commented Mar 1, 2024

Pull Request Test Coverage Report for Build 8112993791

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 93.964%

Totals Coverage Status
Change from base Build 8112408535: 0.04%
Covered Lines: 673
Relevant Lines: 720

💛 - Coveralls

@palazzem palazzem force-pushed the palazzem/feature-139 branch from d62c695 to 61c7193 Compare March 1, 2024 14:35
@palazzem palazzem force-pushed the palazzem/feature-139 branch from 61c7193 to bae652b Compare March 1, 2024 14:40
@palazzem
Copy link
Owner Author

palazzem commented Mar 1, 2024

Merging as it's possible GitHub is experiencing some issues with their runners.

@palazzem palazzem merged commit d081596 into main Mar 1, 2024
4 checks passed
@palazzem palazzem deleted the palazzem/feature-139 branch March 1, 2024 14:41
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.

Implement a binary sensor to expose the connectivity status
2 participants