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

Add Sensor, Make Sending Check Optional, Code Cleanup #46

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Snuffy2
Copy link
Contributor

@Snuffy2 Snuffy2 commented Aug 15, 2023

I apologize for the size of this PR. I was looking to add an option to create Sensors instead of Binary Sensors and to make sending the Check ID optional. In order to get these working, I ended up cleaning up the config flow and moving a bunch of variables into const for consistency.

Changes:

  • Implement unload (Same as PR Implement unload to allow reloading integration #42)
  • Send the Check first before updating the HealthChecks data, separate out the error reporting and make it more tolerant to errors (will continue to check again in 5 min) (Same as PR Send Check First & Separate Out Errors #43)
  • Add option to create Binary Sensors (default), Sensors, or Both of the HealthChecks
    • The Sensor gives the state which gives a little more detail than just true/false (ex. Grace)
  • Make it optional to list a Check ID. If not entered, it will not send the update ping every 5 min. Useful if you want to have entities for HealthChecks but not have a HealthCheck for your HA.
  • Move a number of entity variables to const to standardize between Binary Sensor and Sensor
  • Config flow optimization (Includes PR Fix potential mutable dict issue #44)
  • General code cleanup

@Snuffy2 Snuffy2 force-pushed the Sensor,-Optional-Check,-Code-Cleanup branch from dd71b53 to 2b84d9d Compare October 9, 2023 16:01
@johntdyer
Copy link

any plans to merge this ?

Copy link
Collaborator

@ludeeus ludeeus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a rebase.
This also needs to be split into sizable chunks, do 1 thing pr. PR.

@ludeeus ludeeus marked this pull request as draft July 23, 2024 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants