Uptime Kuma core integration with Uptime Kuma addon

I have been running the Uptime Kuma addon within HA, to monitor a few devices for availability and had been using the Uptime Kuma HACS integration to get all the entities into HA.
My Uptime Kuma addon is up-to-date (version: 0.14.0)
As from HA 2025.8 Uptime Kuma integration is now part of the core, so no longer need the HACS integration. I had kept mine running as it was until the other day when I received an update notice for the HACS Uptime Kuma integration, which stated that it was now archived and would not longer be updated, which makes sense if there is a core integration now.
So I decided to uninstall the HACS uptime Kuma integration, restarted HA and then when I went to Devices and Service there was the “Discovered” entry for Uptime Kuma, great.

When I click the “Add” button to add the new core integration, it prompts for the API key, which I paste in and click Submit, but then just get “Unexpected error”.
When I check the HA logs there is an entry labelled “Unexpected exception” with the following detail

Logger: homeassistant.components.uptime_kuma.config_flow
Source: components/uptime_kuma/config_flow.py:59
integration: Uptime Kuma (documentation, issues)
First occurred: 10:50:50 (4 occurrences)
Last logged: 12:59:35

Unexpected exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/prometheus_client/parser.py", line 115, in _parse_sample
    label_start, label_end = text.index("{"), text.rindex("}")
                             ~~~~~~~~~~^^^^^
ValueError: substring not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/uptime_kuma/config_flow.py", line 59, in validate_connection
    await uptime_kuma.metrics()
  File "/usr/local/lib/python3.13/site-packages/pythonkuma/uptimekuma.py", line 93, in metrics
    for metric in text_string_to_metric_families(await request.text()):
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/prometheus_client/parser.py", line 14, in text_string_to_metric_families
    yield from text_fd_to_metric_families(StringIO.StringIO(text))
  File "/usr/local/lib/python3.13/site-packages/prometheus_client/parser.py", line 210, in text_fd_to_metric_families
    sample = _parse_sample(line)
  File "/usr/local/lib/python3.13/site-packages/prometheus_client/parser.py", line 133, in _parse_sample
    value, timestamp = _parse_value_and_timestamp(text[name_end:])
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/prometheus_client/parser.py", line 107, in _parse_value_and_timestamp
    value = float(values[0])
ValueError: could not convert string to float: 'html>'

Any idea what this means? is the addon or the integration the “problem” here?

So, I’ve been messing around with this some more and have found the “issue”, after uninstalling the Uptime Kuma add-on and re-installing it…
When I re-installed the add-on I noticed that I had changed the default listening port from 3001 to be 3002, as I already had another add-on listening on port 3001.

As a test I stopped the add-on that was listening on port 3001 and set Uptime Kuma back to its default 3001, then tried to add the new core Uptime Kuma integration and it worked.
So the issue is that if the Uptime Kuma add-on is not using its default port 3001 the new core integration does not install as it does not seem to connect on the correct port as defined by the add-on itself, even though the integration shows up as discovered with the Uptime Kuma add-on running…

So, bottom line, keep the Uptime Kuma add-on running on port 3001 if you want to use the core Uptime Kuma integration

Hi, this is an issue with the Uptime Kuma Add-on. I hardcoded the port to 3001 when I added discovery support to the add-on. So the add-on is the problem. There is a PR pending approval but it might help get it fixed faster if you open a bug report