From 173db170af78de56ea2c2d2791a59188b99f88a1 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:46:07 +0100 Subject: [PATCH] Remove 'energy' name from HomeWizard (#159089) --- homeassistant/components/homewizard/helpers.py | 2 +- homeassistant/components/homewizard/manifest.json | 2 +- homeassistant/components/homewizard/strings.json | 12 ++++++------ homeassistant/components/homewizard/switch.py | 2 +- homeassistant/generated/integrations.json | 2 +- tests/components/homewizard/test_button.py | 2 +- tests/components/homewizard/test_number.py | 2 +- tests/components/homewizard/test_select.py | 2 +- tests/components/homewizard/test_switch.py | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/homeassistant/components/homewizard/helpers.py b/homeassistant/components/homewizard/helpers.py index 0aee8f80078..6197ec73e20 100644 --- a/homeassistant/components/homewizard/helpers.py +++ b/homeassistant/components/homewizard/helpers.py @@ -16,7 +16,7 @@ from .entity import HomeWizardEntity def homewizard_exception_handler[_HomeWizardEntityT: HomeWizardEntity, **_P]( func: Callable[Concatenate[_HomeWizardEntityT, _P], Coroutine[Any, Any, Any]], ) -> Callable[Concatenate[_HomeWizardEntityT, _P], Coroutine[Any, Any, None]]: - """Decorate HomeWizard Energy calls to handle HomeWizardEnergy exceptions. + """Decorate HomeWizard calls to handle HomeWizardEnergy exceptions. A decorator that wraps the passed in function, catches HomeWizardEnergy errors, and reloads the integration when the API was disabled so the reauth flow is diff --git a/homeassistant/components/homewizard/manifest.json b/homeassistant/components/homewizard/manifest.json index 2ae50ffd0ca..63500eb1f71 100644 --- a/homeassistant/components/homewizard/manifest.json +++ b/homeassistant/components/homewizard/manifest.json @@ -1,6 +1,6 @@ { "domain": "homewizard", - "name": "HomeWizard Energy", + "name": "HomeWizard", "codeowners": ["@DCSBL"], "config_flow": true, "dhcp": [ diff --git a/homeassistant/components/homewizard/strings.json b/homeassistant/components/homewizard/strings.json index e92d6d5d04c..cea3d3a3e50 100644 --- a/homeassistant/components/homewizard/strings.json +++ b/homeassistant/components/homewizard/strings.json @@ -12,13 +12,13 @@ "wrong_device": "The configured device is not the same found on this IP address." }, "error": { - "api_not_enabled": "The local API is disabled. Go to the HomeWizard Energy app and enable the API in the device settings.", + "api_not_enabled": "The local API is disabled. Go to the HomeWizard app and enable the API in the device settings.", "authorization_failed": "Failed to authorize, make sure to press the button of the device within 30 seconds", "network_error": "Device unreachable, make sure that you have entered the correct IP address and that the device is available in your network" }, "step": { "authorize": { - "description": "Press the button on the HomeWizard Energy device for two seconds, then select the button below.", + "description": "Press the button on the HomeWizard device for two seconds, then select the button below.", "title": "Authorize" }, "discovery_confirm": { @@ -30,7 +30,7 @@ "title": "Re-authenticate" }, "reauth_enable_api": { - "description": "The local API is disabled. Go to the HomeWizard Energy app and enable the API in the device settings." + "description": "The local API is disabled. Go to the HomeWizard app and enable the API in the device settings." }, "reconfigure": { "data": { @@ -46,9 +46,9 @@ "ip_address": "[%key:common::config_flow::data::ip%]" }, "data_description": { - "ip_address": "The IP address of your HomeWizard Energy device." + "ip_address": "The IP address of your HomeWizard device." }, - "description": "Enter the IP address of your HomeWizard Energy device to integrate with Home Assistant.", + "description": "Enter the IP address of your HomeWizard device to integrate with Home Assistant.", "title": "Configure device" } } @@ -174,7 +174,7 @@ "message": "The local API is unauthorized. Restore API access by following the instructions in the repair issue." }, "communication_error": { - "message": "An error occurred while communicating with your HomeWizard Energy device" + "message": "An error occurred while communicating with your HomeWizard device" } }, "issues": { diff --git a/homeassistant/components/homewizard/switch.py b/homeassistant/components/homewizard/switch.py index 1930b40583d..786475c26f7 100644 --- a/homeassistant/components/homewizard/switch.py +++ b/homeassistant/components/homewizard/switch.py @@ -1,4 +1,4 @@ -"""Creates HomeWizard Energy switch entities.""" +"""Creates HomeWizard switch entities.""" from __future__ import annotations diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json index 049a6b47d7e..3dbf59848a1 100644 --- a/homeassistant/generated/integrations.json +++ b/homeassistant/generated/integrations.json @@ -2819,7 +2819,7 @@ ] }, "homewizard": { - "name": "HomeWizard Energy", + "name": "HomeWizard", "integration_type": "device", "config_flow": true, "iot_class": "local_polling" diff --git a/tests/components/homewizard/test_button.py b/tests/components/homewizard/test_button.py index f5c28735da4..69e2bac0a1a 100644 --- a/tests/components/homewizard/test_button.py +++ b/tests/components/homewizard/test_button.py @@ -61,7 +61,7 @@ async def test_identify_button( with pytest.raises( HomeAssistantError, - match=r"^An error occurred while communicating with your HomeWizard Energy device$", + match=r"^An error occurred while communicating with your HomeWizard device$", ): await hass.services.async_call( button.DOMAIN, diff --git a/tests/components/homewizard/test_number.py b/tests/components/homewizard/test_number.py index ffc31cb3859..1580b2e9c4f 100644 --- a/tests/components/homewizard/test_number.py +++ b/tests/components/homewizard/test_number.py @@ -73,7 +73,7 @@ async def test_number_entities( mock_homewizardenergy.system.side_effect = RequestError with pytest.raises( HomeAssistantError, - match=r"^An error occurred while communicating with your HomeWizard Energy device$", + match=r"^An error occurred while communicating with your HomeWizard device$", ): await hass.services.async_call( number.DOMAIN, diff --git a/tests/components/homewizard/test_select.py b/tests/components/homewizard/test_select.py index d61f8d167c4..c885fcb311d 100644 --- a/tests/components/homewizard/test_select.py +++ b/tests/components/homewizard/test_select.py @@ -155,7 +155,7 @@ async def test_select_request_error( mock_homewizardenergy.batteries.side_effect = RequestError with pytest.raises( HomeAssistantError, - match=r"^An error occurred while communicating with your HomeWizard Energy device$", + match=r"^An error occurred while communicating with your HomeWizard device$", ): await hass.services.async_call( SELECT_DOMAIN, diff --git a/tests/components/homewizard/test_switch.py b/tests/components/homewizard/test_switch.py index 9eba571273d..cd608d28bc0 100644 --- a/tests/components/homewizard/test_switch.py +++ b/tests/components/homewizard/test_switch.py @@ -149,7 +149,7 @@ async def test_switch_entities( with pytest.raises( HomeAssistantError, - match=r"^An error occurred while communicating with your HomeWizard Energy device$", + match=r"^An error occurred while communicating with your HomeWizard device$", ): await hass.services.async_call( switch.DOMAIN, @@ -160,7 +160,7 @@ async def test_switch_entities( with pytest.raises( HomeAssistantError, - match=r"^An error occurred while communicating with your HomeWizard Energy device$", + match=r"^An error occurred while communicating with your HomeWizard device$", ): await hass.services.async_call( switch.DOMAIN,