From b3e7eeb02017b19115fd5b365c04f4be54fea1da Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 29 Oct 2021 13:21:57 +0200 Subject: [PATCH] Fix spelling of OctoPrint (#58686) --- homeassistant/components/octoprint/__init__.py | 2 +- .../components/octoprint/binary_sensor.py | 6 +++--- homeassistant/components/octoprint/sensor.py | 6 +++--- tests/components/octoprint/__init__.py | 4 ++-- tests/components/octoprint/test_binary_sensor.py | 8 ++++---- tests/components/octoprint/test_sensor.py | 14 +++++++------- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/homeassistant/components/octoprint/__init__.py b/homeassistant/components/octoprint/__init__.py index 7ee6a3169da..eee1ccd2814 100644 --- a/homeassistant/components/octoprint/__init__.py +++ b/homeassistant/components/octoprint/__init__.py @@ -47,7 +47,7 @@ def ensure_valid_path(value): PLATFORMS = ["binary_sensor", "sensor"] -DEFAULT_NAME = "Octoprint" +DEFAULT_NAME = "OctoPrint" CONF_NUMBER_OF_TOOLS = "number_of_tools" CONF_BED = "bed" diff --git a/homeassistant/components/octoprint/binary_sensor.py b/homeassistant/components/octoprint/binary_sensor.py index fe18af4f808..1adb04d3417 100644 --- a/homeassistant/components/octoprint/binary_sensor.py +++ b/homeassistant/components/octoprint/binary_sensor.py @@ -53,7 +53,7 @@ class OctoPrintBinarySensorBase(CoordinatorEntity, BinarySensorEntity): """Initialize a new OctoPrint sensor.""" super().__init__(coordinator) self._device_id = device_id - self._attr_name = f"Octoprint {sensor_type}" + self._attr_name = f"OctoPrint {sensor_type}" self._attr_unique_id = f"{sensor_type}-{device_id}" @property @@ -61,8 +61,8 @@ class OctoPrintBinarySensorBase(CoordinatorEntity, BinarySensorEntity): """Device info.""" return { "identifiers": {(COMPONENT_DOMAIN, self._device_id)}, - "manufacturer": "Octoprint", - "name": "Octoprint", + "manufacturer": "OctoPrint", + "name": "OctoPrint", } @property diff --git a/homeassistant/components/octoprint/sensor.py b/homeassistant/components/octoprint/sensor.py index 3feff099297..5a9614c69b4 100644 --- a/homeassistant/components/octoprint/sensor.py +++ b/homeassistant/components/octoprint/sensor.py @@ -76,7 +76,7 @@ class OctoPrintSensorBase(CoordinatorEntity, SensorEntity): """Initialize a new OctoPrint sensor.""" super().__init__(coordinator) self._device_id = device_id - self._attr_name = f"Octoprint {sensor_type}" + self._attr_name = f"OctoPrint {sensor_type}" self._attr_unique_id = f"{sensor_type}-{device_id}" @property @@ -84,8 +84,8 @@ class OctoPrintSensorBase(CoordinatorEntity, SensorEntity): """Device info.""" return { "identifiers": {(COMPONENT_DOMAIN, self._device_id)}, - "manufacturer": "Octoprint", - "name": "Octoprint", + "manufacturer": "OctoPrint", + "name": "OctoPrint", } diff --git a/tests/components/octoprint/__init__.py b/tests/components/octoprint/__init__.py index 4af4a2ea131..5176d2209b1 100644 --- a/tests/components/octoprint/__init__.py +++ b/tests/components/octoprint/__init__.py @@ -67,12 +67,12 @@ async def init_integration( data={ "host": "1.1.1.1", "api_key": "test-key", - "name": "Octoprint", + "name": "OctoPrint", "port": 81, "ssl": True, "path": "/", }, - title="Octoprint", + title="OctoPrint", ) config_entry.add_to_hass(hass) diff --git a/tests/components/octoprint/test_binary_sensor.py b/tests/components/octoprint/test_binary_sensor.py index 139ed0dc139..55e240eb282 100644 --- a/tests/components/octoprint/test_binary_sensor.py +++ b/tests/components/octoprint/test_binary_sensor.py @@ -21,14 +21,14 @@ async def test_sensors(hass): state = hass.states.get("binary_sensor.octoprint_printing") assert state is not None assert state.state == STATE_ON - assert state.name == "Octoprint Printing" + assert state.name == "OctoPrint Printing" entry = entity_registry.async_get("binary_sensor.octoprint_printing") assert entry.unique_id == "Printing-uuid" state = hass.states.get("binary_sensor.octoprint_printing_error") assert state is not None assert state.state == STATE_OFF - assert state.name == "Octoprint Printing Error" + assert state.name == "OctoPrint Printing Error" entry = entity_registry.async_get("binary_sensor.octoprint_printing_error") assert entry.unique_id == "Printing Error-uuid" @@ -42,13 +42,13 @@ async def test_sensors_printer_offline(hass): state = hass.states.get("binary_sensor.octoprint_printing") assert state is not None assert state.state == STATE_UNAVAILABLE - assert state.name == "Octoprint Printing" + assert state.name == "OctoPrint Printing" entry = entity_registry.async_get("binary_sensor.octoprint_printing") assert entry.unique_id == "Printing-uuid" state = hass.states.get("binary_sensor.octoprint_printing_error") assert state is not None assert state.state == STATE_UNAVAILABLE - assert state.name == "Octoprint Printing Error" + assert state.name == "OctoPrint Printing Error" entry = entity_registry.async_get("binary_sensor.octoprint_printing_error") assert entry.unique_id == "Printing Error-uuid" diff --git a/tests/components/octoprint/test_sensor.py b/tests/components/octoprint/test_sensor.py index 3954e9ffbca..c3a02c1bab5 100644 --- a/tests/components/octoprint/test_sensor.py +++ b/tests/components/octoprint/test_sensor.py @@ -29,48 +29,48 @@ async def test_sensors(hass): state = hass.states.get("sensor.octoprint_job_percentage") assert state is not None assert state.state == "50" - assert state.name == "Octoprint Job Percentage" + assert state.name == "OctoPrint Job Percentage" entry = entity_registry.async_get("sensor.octoprint_job_percentage") assert entry.unique_id == "Job Percentage-uuid" state = hass.states.get("sensor.octoprint_current_state") assert state is not None assert state.state == "Operational" - assert state.name == "Octoprint Current State" + assert state.name == "OctoPrint Current State" entry = entity_registry.async_get("sensor.octoprint_current_state") assert entry.unique_id == "Current State-uuid" state = hass.states.get("sensor.octoprint_actual_tool1_temp") assert state is not None assert state.state == "18.83" - assert state.name == "Octoprint actual tool1 temp" + assert state.name == "OctoPrint actual tool1 temp" entry = entity_registry.async_get("sensor.octoprint_actual_tool1_temp") assert entry.unique_id == "actual tool1 temp-uuid" state = hass.states.get("sensor.octoprint_target_tool1_temp") assert state is not None assert state.state == "37.83" - assert state.name == "Octoprint target tool1 temp" + assert state.name == "OctoPrint target tool1 temp" entry = entity_registry.async_get("sensor.octoprint_target_tool1_temp") assert entry.unique_id == "target tool1 temp-uuid" state = hass.states.get("sensor.octoprint_target_tool1_temp") assert state is not None assert state.state == "37.83" - assert state.name == "Octoprint target tool1 temp" + assert state.name == "OctoPrint target tool1 temp" entry = entity_registry.async_get("sensor.octoprint_target_tool1_temp") assert entry.unique_id == "target tool1 temp-uuid" state = hass.states.get("sensor.octoprint_start_time") assert state is not None assert state.state == "2020-02-20T09:00:00" - assert state.name == "Octoprint Start Time" + assert state.name == "OctoPrint Start Time" entry = entity_registry.async_get("sensor.octoprint_start_time") assert entry.unique_id == "Start Time-uuid" state = hass.states.get("sensor.octoprint_estimated_finish_time") assert state is not None assert state.state == "2020-02-20T10:50:00" - assert state.name == "Octoprint Estimated Finish Time" + assert state.name == "OctoPrint Estimated Finish Time" entry = entity_registry.async_get("sensor.octoprint_estimated_finish_time") assert entry.unique_id == "Estimated Finish Time-uuid"