diff --git a/custom_components/calibration/sensor.py b/custom_components/calibration/sensor.py index ddd3d15..0af6f96 100644 --- a/custom_components/calibration/sensor.py +++ b/custom_components/calibration/sensor.py @@ -73,7 +73,7 @@ async def async_setup_platform( # pylint: disable=too-many-locals if not (attribute := conf.get(CONF_ATTRIBUTE)): units = units or get_unit_of_measurement(hass, source) device_class = device_class or get_device_class(hass, source) - state_class = get_capability(hass, source, ATTR_STATE_CLASS) + state_class = state_class or get_capability(hass, source, ATTR_STATE_CLASS) if conf.get(CONF_HIDE_SOURCE) and source_entity and not source_entity.hidden: ent_reg.async_update_entity(source, hidden_by=RegistryEntryHider.INTEGRATION) diff --git a/requirements-test.txt b/requirements-test.txt index 50db92a..5ead62e 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -2,12 +2,12 @@ black==24.3.0 homeassistant-stubs==2024.4.0 isort==5.12 mypy==1.5.1 -numpy==1.26.0 -pylint==3.1.0 -pytest==8.1.1 +numpy==1.26.4 +pylint==3.3.1 +pytest==8.3.3 pytest-aiohttp==1.0.5 -pytest-asyncio==0.23.6 +pytest-asyncio==0.24.0 pytest-cov==5.0.0 # https://github.com/MatthewFlamm/pytest-homeassistant-custom-component/releases -pytest-homeassistant-custom-component>=0.13.111 +pytest-homeassistant-custom-component>=0.13.181 voluptuous-stubs==0.1.1 diff --git a/requirements.txt b/requirements.txt index e8fdeda..e988195 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -homeassistant==2024.4.0 -numpy==1.26.0 \ No newline at end of file +homeassistant==2024.11.0 +numpy==1.26.4