Skip to content

Add Uptime Kuma integration #146393

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

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open

Conversation

tr4nt0r
Copy link
Contributor

@tr4nt0r tr4nt0r commented Jun 9, 2025

Proposed change

Uptime Kuma is an open-source, self-hosted monitoring tool.

Library used for the integration: https://github.com/tr4nt0r/pythonkuma

Limitations

The metrics endpoint currently does not expose a unique identifier, therefore this is relying on the monitor name as identifier, but it is possible to edit the name and also duplicates are possible. I mentioned this in the documentation PR under Known limitations

I also submitted a PR to add a monitor_id, which is already approved:

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request: Add Uptime Kuma docs home-assistant.io#39451
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • 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.

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 link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copy link
Contributor

@wbyoung wbyoung left a comment

Choose a reason for hiding this comment

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

Looks to follow the conventions in most of the integrations that I've looked at thus far. 👍

@home-assistant
Copy link

home-assistant bot commented Jun 9, 2025

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.

@home-assistant home-assistant bot marked this pull request as draft June 9, 2025 20:47
@tr4nt0r tr4nt0r marked this pull request as ready for review June 9, 2025 23:36
@home-assistant home-assistant bot requested a review from joostlek June 9, 2025 23:36
@tr4nt0r
Copy link
Contributor Author

tr4nt0r commented Jun 9, 2025

I think I will have to fork the library, the original library seems unmaintained and has some conflicts and deprecated dependencies. The fork that i use was created to fix these issues but seems to not being published via CI pipeline (although a publish CI exists). Apart from that there are some other issues i want to fix

@joostlek
Copy link
Member

Be sure to give it a shot via email or so, maybe they are willing to hand you over or add you to the maintainers or something :)

@home-assistant home-assistant bot marked this pull request as draft June 10, 2025 17:28
@tr4nt0r tr4nt0r marked this pull request as ready for review June 10, 2025 17:45
@home-assistant home-assistant bot requested a review from joostlek June 10, 2025 17:45
@tr4nt0r tr4nt0r marked this pull request as draft June 10, 2025 18:10
@tr4nt0r tr4nt0r force-pushed the uptime_kuma branch 3 times, most recently from b3a76d4 to 008449d Compare June 11, 2025 10:55
@tr4nt0r tr4nt0r marked this pull request as ready for review June 12, 2025 10:31
@tr4nt0r tr4nt0r force-pushed the uptime_kuma branch 3 times, most recently from 126eb4e to d82a8f6 Compare June 12, 2025 21:48
@frenck frenck requested a review from Copilot June 26, 2025 21:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a new Uptime Kuma integration to Home Assistant, enabling users to monitor uptime metrics via sensors.

  • Implements the config flow, update coordinator, and sensor platform to fetch and expose Uptime Kuma metrics.
  • Supplies translation strings, icons, manifest metadata, and quality‐scale definitions.
  • Adds comprehensive tests and updates dependency and typing configurations.

Reviewed Changes

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

Show a summary per file
File Description
homeassistant/components/uptime_kuma/config_flow.py New user step for configuring Uptime Kuma
homeassistant/components/uptime_kuma/coordinator.py Coordinator fetching metrics and handling errors
homeassistant/components/uptime_kuma/sensor.py Sensor platform exposing monitor attributes
homeassistant/components/uptime_kuma/strings.json Translation keys for UI messages and sensor names
homeassistant/components/uptime_kuma/manifest.json Integration metadata and dependency requirement
tests/components/uptime_kuma/ Unit tests for init, config flow, and sensors
requirements_all.txt & requirements_test_all.txt Added pythonkuma dependency
mypy.ini Enabled strict typing for the new integration
Comments suppressed due to low confidence (1)

homeassistant/components/uptime_kuma/coordinator.py:41

  • DataUpdateCoordinator does not accept a config_entry keyword; remove that argument and instead assign self.config_entry = config_entry after calling super().__init__ so coordinator.config_entry is available.
        super().__init__(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants