From c243dca58e013ca5e140c2484be7751d9b16469f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Fri, 15 Oct 2021 00:50:09 +0200 Subject: [PATCH] Change name from Uptime Robot to UptimeRobot (#57714) --- homeassistant/components/uptimerobot/__init__.py | 6 +++--- homeassistant/components/uptimerobot/binary_sensor.py | 8 ++++---- homeassistant/components/uptimerobot/config_flow.py | 4 ++-- homeassistant/components/uptimerobot/const.py | 4 ++-- homeassistant/components/uptimerobot/entity.py | 4 ++-- homeassistant/components/uptimerobot/manifest.json | 2 +- homeassistant/components/uptimerobot/strings.json | 4 ++-- tests/components/uptimerobot/__init__.py | 2 +- tests/components/uptimerobot/common.py | 6 +++--- tests/components/uptimerobot/test_binary_sensor.py | 4 ++-- tests/components/uptimerobot/test_config_flow.py | 10 +++++----- tests/components/uptimerobot/test_init.py | 2 +- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/homeassistant/components/uptimerobot/__init__.py b/homeassistant/components/uptimerobot/__init__.py index 4eaef45c4d2..c4b2eb54b2f 100644 --- a/homeassistant/components/uptimerobot/__init__.py +++ b/homeassistant/components/uptimerobot/__init__.py @@ -1,4 +1,4 @@ -"""The Uptime Robot integration.""" +"""The UptimeRobot integration.""" from __future__ import annotations from pyuptimerobot import ( @@ -24,7 +24,7 @@ from .const import API_ATTR_OK, COORDINATOR_UPDATE_INTERVAL, DOMAIN, LOGGER, PLA async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: - """Set up Uptime Robot from a config entry.""" + """Set up UptimeRobot from a config entry.""" hass.data.setdefault(DOMAIN, {}) uptime_robot_api = UptimeRobot( entry.data[CONF_API_KEY], async_get_clientsession(hass) @@ -55,7 +55,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: class UptimeRobotDataUpdateCoordinator(DataUpdateCoordinator): - """Data update coordinator for Uptime Robot.""" + """Data update coordinator for UptimeRobot.""" def __init__( self, diff --git a/homeassistant/components/uptimerobot/binary_sensor.py b/homeassistant/components/uptimerobot/binary_sensor.py index ac0dc0c1186..ac40f1f4788 100644 --- a/homeassistant/components/uptimerobot/binary_sensor.py +++ b/homeassistant/components/uptimerobot/binary_sensor.py @@ -1,4 +1,4 @@ -"""A platform that to monitor Uptime Robot monitors.""" +"""UptimeRobot binary_sensor platform.""" from __future__ import annotations import voluptuous as vol @@ -31,7 +31,7 @@ async def async_setup_platform( async_add_entities: AddEntitiesCallback, discovery_info: DiscoveryInfoType | None = None, ) -> None: - """Set up the Uptime Robot binary_sensor platform.""" + """Set up the UptimeRobot binary_sensor platform.""" hass.async_create_task( hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_IMPORT}, data=config @@ -42,7 +42,7 @@ async def async_setup_platform( async def async_setup_entry( hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback ) -> None: - """Set up the Uptime Robot binary_sensors.""" + """Set up the UptimeRobot binary_sensors.""" coordinator: DataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id] async_add_entities( [ @@ -61,7 +61,7 @@ async def async_setup_entry( class UptimeRobotBinarySensor(UptimeRobotEntity, BinarySensorEntity): - """Representation of a Uptime Robot binary sensor.""" + """Representation of a UptimeRobot binary sensor.""" @property def is_on(self) -> bool: diff --git a/homeassistant/components/uptimerobot/config_flow.py b/homeassistant/components/uptimerobot/config_flow.py index 1e8bec992ad..00d85ff3687 100644 --- a/homeassistant/components/uptimerobot/config_flow.py +++ b/homeassistant/components/uptimerobot/config_flow.py @@ -1,4 +1,4 @@ -"""Config flow for Uptime Robot integration.""" +"""Config flow for UptimeRobot integration.""" from __future__ import annotations from pyuptimerobot import ( @@ -23,7 +23,7 @@ STEP_USER_DATA_SCHEMA = vol.Schema({vol.Required(CONF_API_KEY): str}) class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): - """Handle a config flow for Uptime Robot.""" + """Handle a config flow for UptimeRobot.""" VERSION = 1 diff --git a/homeassistant/components/uptimerobot/const.py b/homeassistant/components/uptimerobot/const.py index 7f3655b75cf..1c9bbe3e00b 100644 --- a/homeassistant/components/uptimerobot/const.py +++ b/homeassistant/components/uptimerobot/const.py @@ -1,4 +1,4 @@ -"""Constants for the Uptime Robot integration.""" +"""Constants for the UptimeRobot integration.""" from __future__ import annotations from datetime import timedelta @@ -13,7 +13,7 @@ COORDINATOR_UPDATE_INTERVAL: timedelta = timedelta(seconds=10) DOMAIN: Final = "uptimerobot" PLATFORMS: Final = ["binary_sensor"] -ATTRIBUTION: Final = "Data provided by Uptime Robot" +ATTRIBUTION: Final = "Data provided by UptimeRobot" ATTR_TARGET: Final = "target" diff --git a/homeassistant/components/uptimerobot/entity.py b/homeassistant/components/uptimerobot/entity.py index f78e2665ffe..8dde12c6091 100644 --- a/homeassistant/components/uptimerobot/entity.py +++ b/homeassistant/components/uptimerobot/entity.py @@ -23,14 +23,14 @@ class UptimeRobotEntity(CoordinatorEntity): description: EntityDescription, monitor: UptimeRobotMonitor, ) -> None: - """Initialize Uptime Robot entities.""" + """Initialize UptimeRobot entities.""" super().__init__(coordinator) self.entity_description = description self._monitor = monitor self._attr_device_info = { "identifiers": {(DOMAIN, str(self.monitor.id))}, "name": self.monitor.friendly_name, - "manufacturer": "Uptime Robot Team", + "manufacturer": "UptimeRobot Team", "entry_type": "service", "model": self.monitor.type.name, "configuration_url": f"https://uptimerobot.com/dashboard#{self.monitor.id}", diff --git a/homeassistant/components/uptimerobot/manifest.json b/homeassistant/components/uptimerobot/manifest.json index 66b1dc9abe4..8f9a9d74103 100644 --- a/homeassistant/components/uptimerobot/manifest.json +++ b/homeassistant/components/uptimerobot/manifest.json @@ -1,6 +1,6 @@ { "domain": "uptimerobot", - "name": "Uptime Robot", + "name": "UptimeRobot", "documentation": "https://www.home-assistant.io/integrations/uptimerobot", "requirements": [ "pyuptimerobot==21.9.0" diff --git a/homeassistant/components/uptimerobot/strings.json b/homeassistant/components/uptimerobot/strings.json index 094130b470d..2946f2e2d5d 100644 --- a/homeassistant/components/uptimerobot/strings.json +++ b/homeassistant/components/uptimerobot/strings.json @@ -2,14 +2,14 @@ "config": { "step": { "user": { - "description": "You need to supply a read-only API key from Uptime Robot", + "description": "You need to supply a read-only API key from UptimeRobot", "data": { "api_key": "[%key:common::config_flow::data::api_key%]" } }, "reauth_confirm": { "title": "[%key:common::config_flow::title::reauth%]", - "description": "You need to supply a new read-only API key from Uptime Robot", + "description": "You need to supply a new read-only API key from UptimeRobot", "data": { "api_key": "[%key:common::config_flow::data::api_key%]" } diff --git a/tests/components/uptimerobot/__init__.py b/tests/components/uptimerobot/__init__.py index b8f18655820..cd83dd8ee74 100644 --- a/tests/components/uptimerobot/__init__.py +++ b/tests/components/uptimerobot/__init__.py @@ -1 +1 @@ -"""Tests for the Uptime Robot integration.""" +"""Tests for the UptimeRobot integration.""" diff --git a/tests/components/uptimerobot/common.py b/tests/components/uptimerobot/common.py index aa241ce5a92..224d2d32911 100644 --- a/tests/components/uptimerobot/common.py +++ b/tests/components/uptimerobot/common.py @@ -1,4 +1,4 @@ -"""Common constants and functions for Uptime Robot tests.""" +"""Common constants and functions for UptimeRobot tests.""" from __future__ import annotations from enum import Enum @@ -61,7 +61,7 @@ def mock_uptimerobot_api_response( status: APIStatus = APIStatus.OK, key: MockApiResponseKey = MockApiResponseKey.MONITORS, ) -> UptimeRobotApiResponse: - """Mock API response for Uptime Robot.""" + """Mock API response for UptimeRobot.""" return UptimeRobotApiResponse.from_dict( { "stat": {"error": APIStatus.FAIL}.get(key, status), @@ -77,7 +77,7 @@ def mock_uptimerobot_api_response( async def setup_uptimerobot_integration(hass: HomeAssistant) -> MockConfigEntry: - """Set up the Uptime Robot integration.""" + """Set up the UptimeRobot integration.""" mock_entry = MockConfigEntry(**MOCK_UPTIMEROBOT_CONFIG_ENTRY_DATA) mock_entry.add_to_hass(hass) diff --git a/tests/components/uptimerobot/test_binary_sensor.py b/tests/components/uptimerobot/test_binary_sensor.py index 13bb3b342e9..f86ab9eef14 100644 --- a/tests/components/uptimerobot/test_binary_sensor.py +++ b/tests/components/uptimerobot/test_binary_sensor.py @@ -1,4 +1,4 @@ -"""Test Uptime Robot binary_sensor.""" +"""Test UptimeRobot binary_sensor.""" from unittest.mock import patch @@ -53,7 +53,7 @@ async def test_config_import(hass: HomeAssistant) -> None: async def test_presentation(hass: HomeAssistant) -> None: - """Test the presenstation of Uptime Robot binary_sensors.""" + """Test the presenstation of UptimeRobot binary_sensors.""" await setup_uptimerobot_integration(hass) entity = hass.states.get(UPTIMEROBOT_TEST_ENTITY) diff --git a/tests/components/uptimerobot/test_config_flow.py b/tests/components/uptimerobot/test_config_flow.py index 8c5225ad38c..074179761d9 100644 --- a/tests/components/uptimerobot/test_config_flow.py +++ b/tests/components/uptimerobot/test_config_flow.py @@ -1,4 +1,4 @@ -"""Test the Uptime Robot config flow.""" +"""Test the UptimeRobot config flow.""" from unittest.mock import patch import pytest @@ -196,7 +196,7 @@ async def test_user_unique_id_already_exists( async def test_reauthentication( hass: HomeAssistant, ) -> None: - """Test Uptime Robot reauthentication.""" + """Test UptimeRobot reauthentication.""" old_entry = MockConfigEntry(**MOCK_UPTIMEROBOT_CONFIG_ENTRY_DATA) old_entry.add_to_hass(hass) @@ -235,7 +235,7 @@ async def test_reauthentication( async def test_reauthentication_failure( hass: HomeAssistant, ) -> None: - """Test Uptime Robot reauthentication failure.""" + """Test UptimeRobot reauthentication failure.""" old_entry = MockConfigEntry(**MOCK_UPTIMEROBOT_CONFIG_ENTRY_DATA) old_entry.add_to_hass(hass) @@ -275,7 +275,7 @@ async def test_reauthentication_failure( async def test_reauthentication_failure_no_existing_entry( hass: HomeAssistant, ) -> None: - """Test Uptime Robot reauthentication with no existing entry.""" + """Test UptimeRobot reauthentication with no existing entry.""" old_entry = MockConfigEntry( **{**MOCK_UPTIMEROBOT_CONFIG_ENTRY_DATA, "unique_id": None} ) @@ -316,7 +316,7 @@ async def test_reauthentication_failure_no_existing_entry( async def test_reauthentication_failure_account_not_matching( hass: HomeAssistant, ) -> None: - """Test Uptime Robot reauthentication failure when using another account.""" + """Test UptimeRobot reauthentication failure when using another account.""" old_entry = MockConfigEntry(**MOCK_UPTIMEROBOT_CONFIG_ENTRY_DATA) old_entry.add_to_hass(hass) diff --git a/tests/components/uptimerobot/test_init.py b/tests/components/uptimerobot/test_init.py index 43f78e7a19f..3a11319f230 100644 --- a/tests/components/uptimerobot/test_init.py +++ b/tests/components/uptimerobot/test_init.py @@ -1,4 +1,4 @@ -"""Test the Uptime Robot init.""" +"""Test the UptimeRobot init.""" from unittest.mock import patch from pytest import LogCaptureFixture