Skip to content

Conversation

@noahwilliamsson
Copy link

@noahwilliamsson noahwilliamsson commented Aug 7, 2025

Describe your changes

Change native_uom to native_unit_of_measurement and make use of unit constants.

Fixes the following error message, as seen with at least Home Assistant 2025.7 and later.

2025-08-07 00:00:00.000 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up dirigera_platform platform for sensor: ikea_starkvind_air_purifier_sensor.__init__() got an unexpected keyword argument 'native_uom'
homeassistant  | Traceback (most recent call last):
homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 451, in _async_setup_platform
homeassistant  |     await asyncio.shield(awaitable)
homeassistant  |   File "/config/custom_components/dirigera_platform/sensor.py", line 67, in async_setup_entry
homeassistant  |     await add_air_purifier_sensors(async_add_entities, platform.air_purifiers)
homeassistant  |   File "/config/custom_components/dirigera_platform/sensor.py", line 112, in add_air_purifier_sensors
homeassistant  |     ikea_starkvind_air_purifier_sensor(
homeassistant  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
homeassistant  |         device=air_purifier,
homeassistant  |         ^^^^^^^^^^^^^^^^^^^^
homeassistant  |     ...<4 lines>...
homeassistant  |         icon_name="mdi:clock-time-eleven-outline",
homeassistant  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |     )
homeassistant  |     ^
homeassistant  | TypeError: ikea_starkvind_air_purifier_sensor.__init__() got an unexpected keyword argument 'native_uom'

Checklist before submitting a pull request

  • Updated base lib and added the required version in the requirements.txt and manifest.json

Checklist for reviewer

  • Select "Squash and merge" to keep commit timeline clean

Change `native_uom` to `native_unit_of_measurement` and make use of unit constants.

Fixes the following error message, as seen with at least Home Assistant 2025.7 and later.

    2025-08-07 00:00:00.000 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up dirigera_platform platform for sensor: ikea_starkvind_air_purifier_sensor.__init__() got an unexpected keyword argument 'native_uom'
    homeassistant  | Traceback (most recent call last):
    homeassistant  |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 451, in _async_setup_platform
    homeassistant  |     await asyncio.shield(awaitable)
    homeassistant  |   File "/config/custom_components/dirigera_platform/sensor.py", line 67, in async_setup_entry
    homeassistant  |     await add_air_purifier_sensors(async_add_entities, platform.air_purifiers)
    homeassistant  |   File "/config/custom_components/dirigera_platform/sensor.py", line 112, in add_air_purifier_sensors
    homeassistant  |     ikea_starkvind_air_purifier_sensor(
    homeassistant  |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    homeassistant  |         device=air_purifier,
    homeassistant  |         ^^^^^^^^^^^^^^^^^^^^
    homeassistant  |     ...<4 lines>...
    homeassistant  |         icon_name="mdi:clock-time-eleven-outline",
    homeassistant  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    homeassistant  |     )
    homeassistant  |     ^
    homeassistant  | TypeError: ikea_starkvind_air_purifier_sensor.__init__() got an unexpected keyword argument 'native_uom'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant