-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
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
base: dev
Are you sure you want to change the base?
Add Uptime Kuma integration #146393
Conversation
There was a problem hiding this 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. 👍
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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 |
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 :) |
b3a76d4
to
008449d
Compare
126eb4e
to
d82a8f6
Compare
There was a problem hiding this 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 assignself.config_entry = config_entry
after callingsuper().__init__
socoordinator.config_entry
is available.
super().__init__(
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 limitationsI also submitted a PR to add a
monitor_id
, which is already approved:Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: