From ae9f2e6046630556b02d91c028553dd84321339c Mon Sep 17 00:00:00 2001 From: Andreas Jakl Date: Sat, 21 Feb 2026 16:43:38 +0100 Subject: [PATCH 1/3] NRGkick integration: add reauth config flow (#163619) --- .../components/nrgkick/config_flow.py | 99 ++++++++++++----- .../components/nrgkick/coordinator.py | 4 +- .../components/nrgkick/quality_scale.yaml | 2 +- homeassistant/components/nrgkick/strings.json | 15 ++- tests/components/nrgkick/test_config_flow.py | 101 ++++++++++++++++++ 5 files changed, 191 insertions(+), 30 deletions(-) diff --git a/homeassistant/components/nrgkick/config_flow.py b/homeassistant/components/nrgkick/config_flow.py index 943992cdd46300..b84a331823ab27 100644 --- a/homeassistant/components/nrgkick/config_flow.py +++ b/homeassistant/components/nrgkick/config_flow.py @@ -2,6 +2,7 @@ from __future__ import annotations +from collections.abc import Mapping import logging from typing import TYPE_CHECKING, Any @@ -119,6 +120,31 @@ def __init__(self) -> None: self._discovered_name: str | None = None self._pending_host: str | None = None + async def _async_validate_credentials( + self, + host: str, + errors: dict[str, str], + username: str | None = None, + password: str | None = None, + ) -> dict[str, Any] | None: + """Validate credentials and populate errors dict on failure.""" + try: + return await validate_input( + self.hass, host, username=username, password=password + ) + except NRGkickApiClientApiDisabledError: + errors["base"] = "json_api_disabled" + except NRGkickApiClientAuthenticationError: + errors["base"] = "invalid_auth" + except NRGkickApiClientInvalidResponseError: + errors["base"] = "invalid_response" + except NRGkickApiClientCommunicationError: + errors["base"] = "cannot_connect" + except NRGkickApiClientError: + _LOGGER.exception("Unexpected error") + errors["base"] = "unknown" + return None + async def async_step_user( self, user_input: dict[str, Any] | None = None ) -> ConfigFlowResult: @@ -169,36 +195,20 @@ async def async_step_user_auth( assert self._pending_host is not None if user_input is not None: - username = user_input.get(CONF_USERNAME) - password = user_input.get(CONF_PASSWORD) - - try: - info = await validate_input( - self.hass, - self._pending_host, - username=username, - password=password, - ) - except NRGkickApiClientApiDisabledError: - errors["base"] = "json_api_disabled" - except NRGkickApiClientAuthenticationError: - errors["base"] = "invalid_auth" - except NRGkickApiClientInvalidResponseError: - errors["base"] = "invalid_response" - except NRGkickApiClientCommunicationError: - errors["base"] = "cannot_connect" - except NRGkickApiClientError: - _LOGGER.exception("Unexpected error") - errors["base"] = "unknown" - else: + if info := await self._async_validate_credentials( + self._pending_host, + errors, + username=user_input[CONF_USERNAME], + password=user_input[CONF_PASSWORD], + ): await self.async_set_unique_id(info["serial"], raise_on_progress=False) self._abort_if_unique_id_configured() return self.async_create_entry( title=info["title"], data={ CONF_HOST: self._pending_host, - CONF_USERNAME: username, - CONF_PASSWORD: password, + CONF_USERNAME: user_input[CONF_USERNAME], + CONF_PASSWORD: user_input[CONF_PASSWORD], }, ) @@ -211,6 +221,42 @@ async def async_step_user_auth( }, ) + async def async_step_reauth( + self, entry_data: Mapping[str, Any] + ) -> ConfigFlowResult: + """Handle initiation of reauthentication.""" + return await self.async_step_reauth_confirm() + + async def async_step_reauth_confirm( + self, user_input: dict[str, Any] | None = None + ) -> ConfigFlowResult: + """Handle reauthentication.""" + errors: dict[str, str] = {} + + if user_input is not None: + reauth_entry = self._get_reauth_entry() + if info := await self._async_validate_credentials( + reauth_entry.data[CONF_HOST], + errors, + username=user_input[CONF_USERNAME], + password=user_input[CONF_PASSWORD], + ): + await self.async_set_unique_id(info["serial"], raise_on_progress=False) + self._abort_if_unique_id_mismatch() + return self.async_update_reload_and_abort( + reauth_entry, + data_updates=user_input, + ) + + return self.async_show_form( + step_id="reauth_confirm", + data_schema=self.add_suggested_values_to_schema( + STEP_AUTH_DATA_SCHEMA, + self._get_reauth_entry().data, + ), + errors=errors, + ) + async def async_step_zeroconf( self, discovery_info: ZeroconfServiceInfo ) -> ConfigFlowResult: @@ -235,8 +281,9 @@ async def async_step_zeroconf( # Store discovery info for the confirmation step. self._discovered_host = discovery_info.host # Fallback: device_name -> model_type -> "NRGkick". - self._discovered_name = device_name or model_type or "NRGkick" - self.context["title_placeholders"] = {"name": self._discovered_name} + discovered_name = device_name or model_type or "NRGkick" + self._discovered_name = discovered_name + self.context["title_placeholders"] = {"name": discovered_name} # If JSON API is disabled, guide the user through enabling it. if json_api_enabled != "1": diff --git a/homeassistant/components/nrgkick/coordinator.py b/homeassistant/components/nrgkick/coordinator.py index b83079d64fe035..d9cc6c9966980a 100644 --- a/homeassistant/components/nrgkick/coordinator.py +++ b/homeassistant/components/nrgkick/coordinator.py @@ -18,7 +18,7 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant -from homeassistant.exceptions import ConfigEntryError +from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryError from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from .const import DEFAULT_SCAN_INTERVAL, DOMAIN @@ -65,7 +65,7 @@ async def _async_update_data(self) -> NRGkickData: control = await self.api.get_control() values = await self.api.get_values(raw=True) except NRGkickAuthenticationError as error: - raise ConfigEntryError( + raise ConfigEntryAuthFailed( translation_domain=DOMAIN, translation_key="authentication_error", ) from error diff --git a/homeassistant/components/nrgkick/quality_scale.yaml b/homeassistant/components/nrgkick/quality_scale.yaml index 1d832b931ec9b5..0e657cf0eb51eb 100644 --- a/homeassistant/components/nrgkick/quality_scale.yaml +++ b/homeassistant/components/nrgkick/quality_scale.yaml @@ -43,7 +43,7 @@ rules: integration-owner: done log-when-unavailable: todo parallel-updates: done - reauthentication-flow: todo + reauthentication-flow: done test-coverage: done # Gold diff --git a/homeassistant/components/nrgkick/strings.json b/homeassistant/components/nrgkick/strings.json index e1aa470dd275cd..ee1bfe3c267dd4 100644 --- a/homeassistant/components/nrgkick/strings.json +++ b/homeassistant/components/nrgkick/strings.json @@ -4,7 +4,9 @@ "already_configured": "[%key:common::config_flow::abort::already_configured_device%]", "already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]", "json_api_disabled": "JSON API is disabled on the device. Enable it in the NRGkick mobile app under Extended \u2192 Local API \u2192 API Variants.", - "no_serial_number": "Device does not provide a serial number" + "no_serial_number": "Device does not provide a serial number", + "reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]", + "unique_id_mismatch": "The device does not match the previous device" }, "error": { "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", @@ -15,6 +17,17 @@ "unknown": "[%key:common::config_flow::error::unknown%]" }, "step": { + "reauth_confirm": { + "data": { + "password": "[%key:common::config_flow::data::password%]", + "username": "[%key:common::config_flow::data::username%]" + }, + "data_description": { + "password": "[%key:component::nrgkick::config::step::user_auth::data_description::password%]", + "username": "[%key:component::nrgkick::config::step::user_auth::data_description::username%]" + }, + "description": "Reauthenticate with your NRGkick device.\n\nGet your username and password in the NRGkick mobile app:\n1. Open the NRGkick mobile app \u2192 Extended \u2192 Local API\n2. Under Authentication (JSON), check or set your username and password" + }, "user": { "data": { "host": "[%key:common::config_flow::data::host%]" diff --git a/tests/components/nrgkick/test_config_flow.py b/tests/components/nrgkick/test_config_flow.py index 87a7d1eb2409ae..becd793ac7dfa3 100644 --- a/tests/components/nrgkick/test_config_flow.py +++ b/tests/components/nrgkick/test_config_flow.py @@ -674,3 +674,104 @@ async def test_zeroconf_no_serial_number(hass: HomeAssistant) -> None: assert result["type"] is FlowResultType.ABORT assert result["reason"] == "no_serial_number" + + +@pytest.mark.usefixtures("mock_setup_entry") +async def test_reauth_flow( + hass: HomeAssistant, + mock_config_entry: MockConfigEntry, + mock_nrgkick_api: AsyncMock, +) -> None: + """Test reauthentication flow.""" + mock_config_entry.add_to_hass(hass) + + result = await mock_config_entry.start_reauth_flow(hass) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "reauth_confirm" + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + {CONF_USERNAME: "new_user", CONF_PASSWORD: "new_pass"}, + ) + + assert result["type"] is FlowResultType.ABORT + assert result["reason"] == "reauth_successful" + assert mock_config_entry.data[CONF_HOST] == "192.168.1.100" + assert mock_config_entry.data[CONF_USERNAME] == "new_user" + assert mock_config_entry.data[CONF_PASSWORD] == "new_pass" + + +@pytest.mark.parametrize( + ("exception", "error"), + [ + (NRGkickAPIDisabledError, "json_api_disabled"), + (NRGkickAuthenticationError, "invalid_auth"), + (NRGkickApiClientInvalidResponseError, "invalid_response"), + (NRGkickConnectionError, "cannot_connect"), + (NRGkickApiClientError, "unknown"), + ], +) +@pytest.mark.usefixtures("mock_setup_entry") +async def test_reauth_flow_errors( + hass: HomeAssistant, + mock_config_entry: MockConfigEntry, + mock_nrgkick_api: AsyncMock, + exception: Exception, + error: str, +) -> None: + """Test reauthentication flow error handling and recovery.""" + mock_config_entry.add_to_hass(hass) + + result = await mock_config_entry.start_reauth_flow(hass) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "reauth_confirm" + + mock_nrgkick_api.test_connection.side_effect = exception + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + {CONF_USERNAME: "user", CONF_PASSWORD: "pass"}, + ) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "reauth_confirm" + assert result["errors"] == {"base": error} + + mock_nrgkick_api.test_connection.side_effect = None + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + {CONF_USERNAME: "user", CONF_PASSWORD: "pass"}, + ) + + assert result["type"] is FlowResultType.ABORT + assert result["reason"] == "reauth_successful" + + +@pytest.mark.usefixtures("mock_setup_entry") +async def test_reauth_flow_unique_id_mismatch( + hass: HomeAssistant, + mock_config_entry: MockConfigEntry, + mock_nrgkick_api: AsyncMock, +) -> None: + """Test reauthentication aborts on unique ID mismatch.""" + mock_config_entry.add_to_hass(hass) + + result = await mock_config_entry.start_reauth_flow(hass) + + assert result["type"] is FlowResultType.FORM + assert result["step_id"] == "reauth_confirm" + + mock_nrgkick_api.get_info.return_value = { + "general": {"serial_number": "DIFFERENT123", "device_name": "Other"} + } + + result = await hass.config_entries.flow.async_configure( + result["flow_id"], + {CONF_USERNAME: "user", CONF_PASSWORD: "pass"}, + ) + + assert result["type"] is FlowResultType.ABORT + assert result["reason"] == "unique_id_mismatch" From 666f6577e6e66430bcb0331ef00616dadd733283 Mon Sep 17 00:00:00 2001 From: Christopher Fenner <9592452+CFenner@users.noreply.github.com> Date: Sat, 21 Feb 2026 18:09:28 +0100 Subject: [PATCH 2/3] Bump PyViCare to 2.58.0 (#163686) --- homeassistant/components/vicare/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- .../vicare/snapshots/test_sensor.ambr | 379 ++++++++++++++++++ 4 files changed, 382 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/vicare/manifest.json b/homeassistant/components/vicare/manifest.json index 77e43552cf6aab..9ed1465032c56f 100644 --- a/homeassistant/components/vicare/manifest.json +++ b/homeassistant/components/vicare/manifest.json @@ -12,5 +12,5 @@ "integration_type": "hub", "iot_class": "cloud_polling", "loggers": ["PyViCare"], - "requirements": ["PyViCare==2.57.0"] + "requirements": ["PyViCare==2.58.0"] } diff --git a/requirements_all.txt b/requirements_all.txt index be85f49ec8a5af..ac363fdcb0d0dd 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -99,7 +99,7 @@ PyTransportNSW==0.1.1 PyTurboJPEG==1.8.0 # homeassistant.components.vicare -PyViCare==2.57.0 +PyViCare==2.58.0 # homeassistant.components.xiaomi_aqara PyXiaomiGateway==0.14.3 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 2bef9d9271a7de..7c8f67dc76f195 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -96,7 +96,7 @@ PyTransportNSW==0.1.1 PyTurboJPEG==1.8.0 # homeassistant.components.vicare -PyViCare==2.57.0 +PyViCare==2.58.0 # homeassistant.components.xiaomi_aqara PyXiaomiGateway==0.14.3 diff --git a/tests/components/vicare/snapshots/test_sensor.ambr b/tests/components/vicare/snapshots/test_sensor.ambr index 1498f6e079ceef..b45b371f8cef9f 100644 --- a/tests/components/vicare/snapshots/test_sensor.ambr +++ b/tests/components/vicare/snapshots/test_sensor.ambr @@ -2189,6 +2189,63 @@ 'state': '46.8', }) # --- +# name: test_all_entities[sensor.model1_electricity_consumption_this_year-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model1_electricity_consumption_this_year', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Electricity consumption this year', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity consumption this year', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'power_consumption_this_year', + 'unique_id': 'gateway1_deviceSerialVitocal250A-power consumption this year', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[sensor.model1_electricity_consumption_this_year-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model1 Electricity consumption this year', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model1_electricity_consumption_this_year', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3440.8', + }) +# --- # name: test_all_entities[sensor.model1_electricity_consumption_today-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -2246,6 +2303,63 @@ 'state': '7.2', }) # --- +# name: test_all_entities[sensor.model1_energy-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.model1_energy', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Energy', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Energy', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'power consumption this month', + 'unique_id': 'gateway1_deviceSerialVitocal250A-power consumption this month', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[sensor.model1_energy-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'model1 Energy', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model1_energy', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '48.3', + }) +# --- # name: test_all_entities[sensor.model1_evaporator_liquid_temperature-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -3621,6 +3735,271 @@ 'state': '2394.4', }) # --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_1-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Compressor hours load class 1', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Compressor hours load class 1', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'compressor_hours_loadclass1', + 'unique_id': 'gateway2_################-compressor_hours_loadclass1-0', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_1-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model2 Compressor hours load class 1', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_1', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '105', + }) +# --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_2-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Compressor hours load class 2', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Compressor hours load class 2', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'compressor_hours_loadclass2', + 'unique_id': 'gateway2_################-compressor_hours_loadclass2-0', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model2 Compressor hours load class 2', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_2', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '455', + }) +# --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_3-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_3', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Compressor hours load class 3', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Compressor hours load class 3', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'compressor_hours_loadclass3', + 'unique_id': 'gateway2_################-compressor_hours_loadclass3-0', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_3-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model2 Compressor hours load class 3', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_3', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1305', + }) +# --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_4-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_4', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Compressor hours load class 4', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Compressor hours load class 4', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'compressor_hours_loadclass4', + 'unique_id': 'gateway2_################-compressor_hours_loadclass4-0', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_4-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model2 Compressor hours load class 4', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_4', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '408', + }) +# --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_5-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_5', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Compressor hours load class 5', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Compressor hours load class 5', + 'platform': 'vicare', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'compressor_hours_loadclass5', + 'unique_id': 'gateway2_################-compressor_hours_loadclass5-0', + 'unit_of_measurement': , + }) +# --- +# name: test_all_entities[sensor.model2_compressor_hours_load_class_5-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'model2 Compressor hours load class 5', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.model2_compressor_hours_load_class_5', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '43', + }) +# --- # name: test_all_entities[sensor.model2_compressor_inlet_pressure-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ From 0e439583a6c69aa30b49d518503fcc151b8ff78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Sat, 21 Feb 2026 18:43:06 +0100 Subject: [PATCH 3/3] Bump python-roborock to 4.15.0 in manifest and requirements files (#163719) --- homeassistant/components/roborock/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/roborock/manifest.json b/homeassistant/components/roborock/manifest.json index c5368803aefe55..f84a22a2d08d3a 100644 --- a/homeassistant/components/roborock/manifest.json +++ b/homeassistant/components/roborock/manifest.json @@ -20,7 +20,7 @@ "loggers": ["roborock"], "quality_scale": "silver", "requirements": [ - "python-roborock==4.14.0", + "python-roborock==4.15.0", "vacuum-map-parser-roborock==0.1.4" ] } diff --git a/requirements_all.txt b/requirements_all.txt index ac363fdcb0d0dd..a95341a8ba3db6 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2627,7 +2627,7 @@ python-rabbitair==0.0.8 python-ripple-api==0.0.3 # homeassistant.components.roborock -python-roborock==4.14.0 +python-roborock==4.15.0 # homeassistant.components.smarttub python-smarttub==0.0.47 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 7c8f67dc76f195..1abfa2f892a185 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2220,7 +2220,7 @@ python-pooldose==0.8.2 python-rabbitair==0.0.8 # homeassistant.components.roborock -python-roborock==4.14.0 +python-roborock==4.15.0 # homeassistant.components.smarttub python-smarttub==0.0.47