mirror of
https://github.com/home-assistant/core.git
synced 2025-12-20 02:48:57 +00:00
Remove 'energy' name from HomeWizard (#159089)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"domain": "homewizard",
|
||||
"name": "HomeWizard Energy",
|
||||
"name": "HomeWizard",
|
||||
"codeowners": ["@DCSBL"],
|
||||
"config_flow": true,
|
||||
"dhcp": [
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Creates HomeWizard Energy switch entities."""
|
||||
"""Creates HomeWizard switch entities."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
@@ -2819,7 +2819,7 @@
|
||||
]
|
||||
},
|
||||
"homewizard": {
|
||||
"name": "HomeWizard Energy",
|
||||
"name": "HomeWizard",
|
||||
"integration_type": "device",
|
||||
"config_flow": true,
|
||||
"iot_class": "local_polling"
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user