Unifi Status component throwing errors in HA logs

Hi All,

I’m seeing a lot of errors for the Unifi Status integration. Can anyone shed some light on where a potential issue may be.

Configuration at the UDM SE side is a local user as suggested in a number of sources.

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:950
First occurred: May 21, 2024 at 7:43:54 PM (10916 occurrences)
Last logged: 1:55:30 PM

Update for sensor.unifi_status_vpn fails
Update for sensor.unifi_status_www fails
Update for sensor.unifi_status_wan fails
Update for sensor.unifi_status_wlan fails
Update for sensor.unifi_status_lan fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 950, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1295, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 191, in wrapper
    result = method(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/unifi_status/sensor.py", line 202, in update
    if sub["subsystem"] == self._sensor:
       ~~~^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

The config is fine and upon checking the graphs, all the data is there.

  ####################################################
  # UNIFI CONFIGURATION
  ####################################################
  - platform: unifi_status
    host: !secret host_udm
    port: 443
    verify_ssl: false
    version: UDMP-unifiOS
    username: !secret unifi_username
    password: !secret unifi_password
    monitored_conditions:
      - www
      - wan
      - wlan
      - lan
      - alerts
      - firmware
      - vpn