diff --git a/homeassistant/components/ezviz/__init__.py b/homeassistant/components/ezviz/__init__.py index 51931f4b104..fbd49102f3c 100644 --- a/homeassistant/components/ezviz/__init__.py +++ b/homeassistant/components/ezviz/__init__.py @@ -1,4 +1,4 @@ -"""Support for Ezviz camera.""" +"""Support for EZVIZ camera.""" import logging from pyezviz.client import EzvizClient @@ -39,7 +39,7 @@ PLATFORMS = [ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: - """Set up Ezviz from a config entry.""" + """Set up EZVIZ from a config entry.""" hass.data.setdefault(DOMAIN, {}) if not entry.options: @@ -56,7 +56,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: # Fetch Entry id of main account and reload it. for item in hass.config_entries.async_entries(): if item.data.get(CONF_TYPE) == ATTR_TYPE_CLOUD: - _LOGGER.info("Reload Ezviz integration with new camera rtsp entry") + _LOGGER.info("Reload EZVIZ integration with new camera rtsp entry") await hass.config_entries.async_reload(item.entry_id) return True @@ -66,7 +66,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: _get_ezviz_client_instance, entry ) except (InvalidURL, HTTPError, PyEzvizError) as error: - _LOGGER.error("Unable to connect to Ezviz service: %s", str(error)) + _LOGGER.error("Unable to connect to EZVIZ service: %s", str(error)) raise ConfigEntryNotReady from error coordinator = EzvizDataUpdateCoordinator( diff --git a/homeassistant/components/ezviz/binary_sensor.py b/homeassistant/components/ezviz/binary_sensor.py index 43ac914a50c..bab6fa5ca97 100644 --- a/homeassistant/components/ezviz/binary_sensor.py +++ b/homeassistant/components/ezviz/binary_sensor.py @@ -1,4 +1,4 @@ -"""Support for Ezviz binary sensors.""" +"""Support for EZVIZ binary sensors.""" from __future__ import annotations from homeassistant.components.binary_sensor import ( @@ -35,7 +35,7 @@ BINARY_SENSOR_TYPES: dict[str, BinarySensorEntityDescription] = { async def async_setup_entry( hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback ) -> None: - """Set up Ezviz sensors based on a config entry.""" + """Set up EZVIZ sensors based on a config entry.""" coordinator: EzvizDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][ DATA_COORDINATOR ] @@ -52,7 +52,7 @@ async def async_setup_entry( class EzvizBinarySensor(EzvizEntity, BinarySensorEntity): - """Representation of a Ezviz sensor.""" + """Representation of a EZVIZ sensor.""" def __init__( self, diff --git a/homeassistant/components/ezviz/camera.py b/homeassistant/components/ezviz/camera.py index 307e1fac185..1f9de4f611c 100644 --- a/homeassistant/components/ezviz/camera.py +++ b/homeassistant/components/ezviz/camera.py @@ -57,7 +57,7 @@ async def async_setup_entry( entry: ConfigEntry, async_add_entities: entity_platform.AddEntitiesCallback, ) -> None: - """Set up Ezviz cameras based on a config entry.""" + """Set up EZVIZ cameras based on a config entry.""" coordinator: EzvizDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][ DATA_COORDINATOR @@ -73,7 +73,7 @@ async def async_setup_entry( if item.unique_id == camera and item.source != SOURCE_IGNORE ] - # There seem to be a bug related to localRtspPort in Ezviz API. + # There seem to be a bug related to localRtspPort in EZVIZ API. local_rtsp_port = ( value["local_rtsp_port"] if value["local_rtsp_port"] != 0 @@ -174,7 +174,7 @@ async def async_setup_entry( class EzvizCamera(EzvizEntity, Camera): - """An implementation of a Ezviz security camera.""" + """An implementation of a EZVIZ security camera.""" def __init__( self, @@ -187,7 +187,7 @@ class EzvizCamera(EzvizEntity, Camera): local_rtsp_port: int, ffmpeg_arguments: str | None, ) -> None: - """Initialize a Ezviz security camera.""" + """Initialize a EZVIZ security camera.""" super().__init__(coordinator, serial) Camera.__init__(self) self.stream_options[CONF_USE_WALLCLOCK_AS_TIMESTAMPS] = True diff --git a/homeassistant/components/ezviz/config_flow.py b/homeassistant/components/ezviz/config_flow.py index 6c334291ee5..61b66280ae8 100644 --- a/homeassistant/components/ezviz/config_flow.py +++ b/homeassistant/components/ezviz/config_flow.py @@ -67,7 +67,7 @@ def _test_camera_rtsp_creds(data): class EzvizConfigFlow(ConfigFlow, domain=DOMAIN): - """Handle a config flow for Ezviz.""" + """Handle a config flow for EZVIZ.""" VERSION = 1 @@ -101,7 +101,7 @@ class EzvizConfigFlow(ConfigFlow, domain=DOMAIN): async def _validate_and_create_camera_rtsp(self, data): """Try DESCRIBE on RTSP camera with credentials.""" - # Get Ezviz cloud credentials from config entry + # Get EZVIZ cloud credentials from config entry ezviz_client_creds = { CONF_USERNAME: None, CONF_PASSWORD: None, @@ -311,14 +311,14 @@ class EzvizConfigFlow(ConfigFlow, domain=DOMAIN): class EzvizOptionsFlowHandler(OptionsFlow): - """Handle Ezviz client options.""" + """Handle EZVIZ client options.""" def __init__(self, config_entry: ConfigEntry) -> None: """Initialize options flow.""" self.config_entry = config_entry async def async_step_init(self, user_input=None): - """Manage Ezviz options.""" + """Manage EZVIZ options.""" if user_input is not None: return self.async_create_entry(title="", data=user_input) diff --git a/homeassistant/components/ezviz/const.py b/homeassistant/components/ezviz/const.py index 5340f48d0f6..b9183772b6c 100644 --- a/homeassistant/components/ezviz/const.py +++ b/homeassistant/components/ezviz/const.py @@ -1,7 +1,7 @@ """Constants for the ezviz integration.""" DOMAIN = "ezviz" -MANUFACTURER = "Ezviz" +MANUFACTURER = "EZVIZ" # Configuration ATTR_SERIAL = "serial" diff --git a/homeassistant/components/ezviz/coordinator.py b/homeassistant/components/ezviz/coordinator.py index 8729aa4cf21..cc4537bb9b9 100644 --- a/homeassistant/components/ezviz/coordinator.py +++ b/homeassistant/components/ezviz/coordinator.py @@ -15,12 +15,12 @@ _LOGGER = logging.getLogger(__name__) class EzvizDataUpdateCoordinator(DataUpdateCoordinator): - """Class to manage fetching Ezviz data.""" + """Class to manage fetching EZVIZ data.""" def __init__( self, hass: HomeAssistant, *, api: EzvizClient, api_timeout: int ) -> None: - """Initialize global Ezviz data updater.""" + """Initialize global EZVIZ data updater.""" self.ezviz_client = api self._api_timeout = api_timeout update_interval = timedelta(seconds=30) @@ -28,11 +28,11 @@ class EzvizDataUpdateCoordinator(DataUpdateCoordinator): super().__init__(hass, _LOGGER, name=DOMAIN, update_interval=update_interval) def _update_data(self) -> dict: - """Fetch data from Ezviz via camera load function.""" + """Fetch data from EZVIZ via camera load function.""" return self.ezviz_client.load_cameras() async def _async_update_data(self) -> dict: - """Fetch data from Ezviz.""" + """Fetch data from EZVIZ.""" try: async with timeout(self._api_timeout): return await self.hass.async_add_executor_job(self._update_data) diff --git a/homeassistant/components/ezviz/entity.py b/homeassistant/components/ezviz/entity.py index 2ab42a93286..e4debedc640 100644 --- a/homeassistant/components/ezviz/entity.py +++ b/homeassistant/components/ezviz/entity.py @@ -1,4 +1,4 @@ -"""An abstract class common to all Ezviz entities.""" +"""An abstract class common to all EZVIZ entities.""" from __future__ import annotations from typing import Any @@ -11,7 +11,7 @@ from .coordinator import EzvizDataUpdateCoordinator class EzvizEntity(CoordinatorEntity[EzvizDataUpdateCoordinator], Entity): - """Generic entity encapsulating common features of Ezviz device.""" + """Generic entity encapsulating common features of EZVIZ device.""" def __init__( self, diff --git a/homeassistant/components/ezviz/manifest.json b/homeassistant/components/ezviz/manifest.json index 47e2ec44e8a..985c96de806 100644 --- a/homeassistant/components/ezviz/manifest.json +++ b/homeassistant/components/ezviz/manifest.json @@ -1,6 +1,6 @@ { "domain": "ezviz", - "name": "Ezviz", + "name": "EZVIZ", "documentation": "https://www.home-assistant.io/integrations/ezviz", "dependencies": ["ffmpeg"], "codeowners": ["@RenierM26", "@baqs"], diff --git a/homeassistant/components/ezviz/sensor.py b/homeassistant/components/ezviz/sensor.py index a7334a3d18b..8e617aa3b3e 100644 --- a/homeassistant/components/ezviz/sensor.py +++ b/homeassistant/components/ezviz/sensor.py @@ -1,4 +1,4 @@ -"""Support for Ezviz sensors.""" +"""Support for EZVIZ sensors.""" from __future__ import annotations from homeassistant.components.sensor import ( @@ -44,7 +44,7 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = { async def async_setup_entry( hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback ) -> None: - """Set up Ezviz sensors based on a config entry.""" + """Set up EZVIZ sensors based on a config entry.""" coordinator: EzvizDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][ DATA_COORDINATOR ] @@ -61,7 +61,7 @@ async def async_setup_entry( class EzvizSensor(EzvizEntity, SensorEntity): - """Representation of a Ezviz sensor.""" + """Representation of a EZVIZ sensor.""" coordinator: EzvizDataUpdateCoordinator diff --git a/homeassistant/components/ezviz/strings.json b/homeassistant/components/ezviz/strings.json index a8831d2ae34..91fa32ad9b2 100644 --- a/homeassistant/components/ezviz/strings.json +++ b/homeassistant/components/ezviz/strings.json @@ -3,7 +3,7 @@ "flow_title": "{serial}", "step": { "user": { - "title": "Connect to Ezviz Cloud", + "title": "Connect to EZVIZ Cloud", "data": { "username": "[%key:common::config_flow::data::username%]", "password": "[%key:common::config_flow::data::password%]", @@ -11,7 +11,7 @@ } }, "user_custom_url": { - "title": "Connect to custom Ezviz URL", + "title": "Connect to custom EZVIZ URL", "description": "Manually specify your region URL", "data": { "username": "[%key:common::config_flow::data::username%]", @@ -20,8 +20,8 @@ } }, "confirm": { - "title": "Discovered Ezviz Camera", - "description": "Enter RTSP credentials for Ezviz camera {serial} with IP {ip_address}", + "title": "Discovered EZVIZ Camera", + "description": "Enter RTSP credentials for EZVIZ camera {serial} with IP {ip_address}", "data": { "username": "[%key:common::config_flow::data::username%]", "password": "[%key:common::config_flow::data::password%]" @@ -36,7 +36,7 @@ "abort": { "already_configured_account": "[%key:common::config_flow::abort::already_configured_account%]", "unknown": "[%key:common::config_flow::error::unknown%]", - "ezviz_cloud_account_missing": "Ezviz cloud account missing. Please reconfigure Ezviz cloud account" + "ezviz_cloud_account_missing": "EZVIZ cloud account missing. Please reconfigure EZVIZ cloud account" } }, "options": { diff --git a/homeassistant/components/ezviz/switch.py b/homeassistant/components/ezviz/switch.py index 55a946f858a..58b28477412 100644 --- a/homeassistant/components/ezviz/switch.py +++ b/homeassistant/components/ezviz/switch.py @@ -1,4 +1,4 @@ -"""Support for Ezviz Switch sensors.""" +"""Support for EZVIZ Switch sensors.""" from __future__ import annotations from typing import Any @@ -19,7 +19,7 @@ from .entity import EzvizEntity async def async_setup_entry( hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback ) -> None: - """Set up Ezviz switch based on a config entry.""" + """Set up EZVIZ switch based on a config entry.""" coordinator: EzvizDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][ DATA_COORDINATOR ] @@ -37,7 +37,7 @@ async def async_setup_entry( class EzvizSwitch(EzvizEntity, SwitchEntity): - """Representation of a Ezviz sensor.""" + """Representation of a EZVIZ sensor.""" _attr_device_class = SwitchDeviceClass.SWITCH diff --git a/homeassistant/components/ezviz/translations/en.json b/homeassistant/components/ezviz/translations/en.json index 9b5e273b0ad..c9f096e7995 100644 --- a/homeassistant/components/ezviz/translations/en.json +++ b/homeassistant/components/ezviz/translations/en.json @@ -2,7 +2,7 @@ "config": { "abort": { "already_configured_account": "Account is already configured", - "ezviz_cloud_account_missing": "Ezviz cloud account missing. Please reconfigure Ezviz cloud account", + "ezviz_cloud_account_missing": "EZVIZ cloud account missing. Please reconfigure EZVIZ cloud account", "unknown": "Unexpected error" }, "error": { @@ -17,8 +17,8 @@ "password": "Password", "username": "Username" }, - "description": "Enter RTSP credentials for Ezviz camera {serial} with IP {ip_address}", - "title": "Discovered Ezviz Camera" + "description": "Enter RTSP credentials for EZVIZ camera {serial} with IP {ip_address}", + "title": "Discovered EZVIZ Camera" }, "user": { "data": { @@ -26,7 +26,7 @@ "url": "URL", "username": "Username" }, - "title": "Connect to Ezviz Cloud" + "title": "Connect to EZVIZ Cloud" }, "user_custom_url": { "data": { @@ -35,7 +35,7 @@ "username": "Username" }, "description": "Manually specify your region URL", - "title": "Connect to custom Ezviz URL" + "title": "Connect to custom EZVIZ URL" } } }, diff --git a/tests/components/ezviz/__init__.py b/tests/components/ezviz/__init__.py index bfb30b893eb..64dcbfc26eb 100644 --- a/tests/components/ezviz/__init__.py +++ b/tests/components/ezviz/__init__.py @@ -1,4 +1,4 @@ -"""Tests for the Ezviz integration.""" +"""Tests for the EZVIZ integration.""" from unittest.mock import patch from homeassistant.components.ezviz.const import ( @@ -74,7 +74,7 @@ async def init_integration( options: dict = ENTRY_OPTIONS, skip_entry_setup: bool = False, ) -> MockConfigEntry: - """Set up the Ezviz integration in Home Assistant.""" + """Set up the EZVIZ integration in Home Assistant.""" entry = MockConfigEntry(domain=DOMAIN, data=data, options=options) entry.add_to_hass(hass) diff --git a/tests/components/ezviz/test_config_flow.py b/tests/components/ezviz/test_config_flow.py index c31a43c1949..65cde18e914 100644 --- a/tests/components/ezviz/test_config_flow.py +++ b/tests/components/ezviz/test_config_flow.py @@ -1,4 +1,4 @@ -"""Test the Ezviz config flow.""" +"""Test the EZVIZ config flow.""" from unittest.mock import patch