Skip to content

Add Gatus Integration - #175085

Merged
joostlek merged 65 commits into
home-assistant:devfrom
TN-1:gatus
Jul 14, 2026
Merged

Add Gatus Integration#175085
joostlek merged 65 commits into
home-assistant:devfrom
TN-1:gatus

Conversation

@TN-1

@TN-1 TN-1 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Proposed change

This PR is adding an integration to support Gatus Uptime Monitoring. Initial support is limited to binary sensors representing the monitored endpoints. https://github.com/TwiN/gatus

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

Copilot AI review requested due to automatic review settings June 29, 2026 02:44

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @TN-1

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant

Copy link
Copy Markdown
Contributor

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new "Gatus" integration for Home Assistant that polls a Gatus uptime-monitoring instance and exposes its monitored endpoints as connectivity binary sensors. It introduces the standard integration scaffolding (manifest, config flow, coordinator, binary sensor platform, strings, quality scale, CODEOWNERS, and generated registries) plus config-flow tests, matching how new service integrations are typically registered in the codebase.

Changes:

  • New gatus integration: config flow (URL entry + validation), 30s polling coordinator, and connectivity binary sensors per endpoint.
  • Config-flow test suite plus bronze quality-scale declaration.
  • Generated registry updates (integrations.json, config_flows.py) and CODEOWNERS entry.

Reviewed changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
homeassistant/components/gatus/init.py Setup/unload of the config entry and runtime coordinator
homeassistant/components/gatus/config_flow.py User config flow validating the Gatus URL
homeassistant/components/gatus/coordinator.py Polls Gatus statuses API every 30s
homeassistant/components/gatus/binary_sensor.py Connectivity sensors; unique IDs not entry-scoped
homeassistant/components/gatus/manifest.json Manifest carries several unused empty keys
homeassistant/components/gatus/quality_scale.yaml Marks non-applicable rules done instead of exempt
homeassistant/components/gatus/const.py / strings.json Domain constant and UI strings
tests/components/gatus/* Config-flow tests; no platform/coordinator tests
homeassistant/generated/* , CODEOWNERS Registry and ownership entries

Comment thread homeassistant/components/gatus/binary_sensor.py Outdated
Comment thread homeassistant/components/gatus/quality_scale.yaml Outdated
Comment thread homeassistant/components/gatus/quality_scale.yaml Outdated
Comment thread homeassistant/components/gatus/manifest.json Outdated
Comment thread homeassistant/components/gatus/binary_sensor.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 29, 2026 02:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 14 changed files in this pull request and generated 4 comments.

Comment thread homeassistant/components/gatus/binary_sensor.py Outdated
Comment thread homeassistant/components/gatus/quality_scale.yaml Outdated
Comment thread homeassistant/components/gatus/quality_scale.yaml Outdated
Comment thread homeassistant/components/gatus/coordinator.py Outdated
@TN-1
TN-1 marked this pull request as ready for review June 29, 2026 03:12
Copilot AI review requested due to automatic review settings June 29, 2026 03:12
@home-assistant
home-assistant Bot dismissed their stale review June 29, 2026 03:12

Stale

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/gatus/quality_scale.yaml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 5 comments.

Comment thread homeassistant/components/gatus/binary_sensor.py Outdated
Comment thread homeassistant/components/gatus/quality_scale.yaml Outdated
Comment thread tests/components/gatus/test_init.py
Comment thread tests/components/gatus/test_binary_sensor.py
Comment thread tests/components/gatus/test_binary_sensor.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 2 comments.

Comment thread homeassistant/components/gatus/manifest.json
Comment thread tests/components/gatus/test_binary_sensor.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.

Comment thread tests/components/gatus/test_binary_sensor.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/gatus/config_flow.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.

Comment thread tests/components/gatus/test_binary_sensor.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 2 comments.

Comment thread tests/components/gatus/test_binary_sensor.py
Comment thread homeassistant/components/gatus/coordinator.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 3 comments.

Comment thread homeassistant/components/gatus/config_flow.py Outdated
Comment thread tests/components/gatus/test_binary_sensor.py
Comment thread homeassistant/components/gatus/config_flow.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/gatus/manifest.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/gatus/quality_scale.yaml
Comment thread tests/components/gatus/test_init.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated no new comments.

@TN-1

TN-1 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks again for the review @joostlek.

Test failures again appear to not be related to my code, is the CI really buggy at the moment or is it just me?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/gatus/coordinator.py
Comment thread homeassistant/components/gatus/binary_sensor.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.

Comment on lines +101 to +105
"""Return the most recent monitoring result (Gatus appends newest last)."""
results = self.endpoint_data.results
if not results:
return None
return results[-1]
@github-actions

Copy link
Copy Markdown

Check requirements

Checked at commit 83cb680.

⚠️ Some checks require attention — see the details below.

Package Old New No Advisories Not Yanked Repo Public CI Upload Release Pipeline Security PR Link Async Safe
gatus-api 1.0.3
📦 gatus-api: 1.0.3
  • No Advisories: ✅ No active advisories reported by PyPI for version 1.0.3.
  • Not Yanked: ✅ Version 1.0.3 is a live (non-yanked) release.
  • Repo Public: ❌ PyPI does not advertise a source repository URL.
  • CI Upload: ✅ Trusted Publisher attestation found (GitHub).
  • Release Pipeline: ✅ OIDC via Trusted Publisher attestation (GitHub); automated CI upload verified by PyPI.
  • Security: ❌ No source repository URL on PyPI — source cannot be inspected.
  • PR Link: ❌ PyPI does not advertise a source repository URL.
  • Async Safe: ❌ PyPI does not advertise a source repository URL.

Generated by Check requirements (AW) · 31.9 AIC · ⌖ 16.7 AIC · ⊞ 31.4K ·

@joostlek

Copy link
Copy Markdown
Member

Please send me a message on Discord

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants