Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/homewizard/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
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,
Comment thread
DCSBL marked this conversation as resolved.
and reloads the integration when the API was disabled so the reauth flow is
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homewizard/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"domain": "homewizard",
"name": "HomeWizard Energy",
"name": "HomeWizard",
"codeowners": ["@DCSBL"],
"config_flow": true,
"dhcp": [
Expand Down
12 changes: 6 additions & 6 deletions homeassistant/components/homewizard/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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": {
Expand All @@ -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"
}
}
Expand Down Expand Up @@ -172,7 +172,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": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homewizard/switch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Creates HomeWizard Energy switch entities."""
"""Creates HomeWizard switch entities."""

from __future__ import annotations

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/generated/integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2819,7 +2819,7 @@
]
},
"homewizard": {
"name": "HomeWizard Energy",
"name": "HomeWizard",
"integration_type": "device",
"config_flow": true,
"iot_class": "local_polling"
Expand Down
2 changes: 1 addition & 1 deletion tests/components/homewizard/test_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/components/homewizard/test_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/components/homewizard/test_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/components/homewizard/test_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Loading