mirror of
https://github.com/home-assistant/core.git
synced 2026-10-07 14:58:11 -04:00
Use the Sofar integration name in docstrings (#183180)
This commit is contained in:
@@ -125,7 +125,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: SofarConfigEntry) -> bool:
|
||||
"""Set up Sofar Inverter Modbus from a config entry."""
|
||||
"""Set up Sofar from a config entry."""
|
||||
serial = entry.unique_id
|
||||
assert serial is not None
|
||||
_async_remove_stale_waiting_time(hass, serial)
|
||||
|
||||
@@ -82,7 +82,7 @@ async def async_setup_entry(
|
||||
entry: SofarConfigEntry,
|
||||
async_add_entities: AddConfigEntryEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the Sofar Inverter Modbus binary sensor platform."""
|
||||
"""Set up the Sofar binary sensor platform."""
|
||||
runtime_data = entry.runtime_data
|
||||
served = runtime_data.served_components
|
||||
async_add_entities(
|
||||
|
||||
@@ -53,7 +53,7 @@ async def async_setup_entry(
|
||||
entry: SofarConfigEntry,
|
||||
async_add_entities: AddConfigEntryEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the Sofar Inverter Modbus button platform."""
|
||||
"""Set up the Sofar button platform."""
|
||||
runtime_data = entry.runtime_data
|
||||
inverter_type = runtime_data.readings.device.inverter_type
|
||||
async_add_entities(
|
||||
|
||||
@@ -58,7 +58,7 @@ async def async_setup_entry(
|
||||
entry: SofarConfigEntry,
|
||||
async_add_entities: AddConfigEntryEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the Sofar Inverter Modbus select platform."""
|
||||
"""Set up the Sofar select platform."""
|
||||
runtime_data = entry.runtime_data
|
||||
served = runtime_data.served_components
|
||||
async_add_entities(
|
||||
|
||||
@@ -43,7 +43,7 @@ async def async_setup_entry(
|
||||
entry: SofarConfigEntry,
|
||||
async_add_entities: AddConfigEntryEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the Sofar Inverter Modbus sensor platform."""
|
||||
"""Set up the Sofar sensor platform."""
|
||||
runtime_data = entry.runtime_data
|
||||
served = runtime_data.served_components
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ async def async_setup_entry(
|
||||
entry: SofarConfigEntry,
|
||||
async_add_entities: AddConfigEntryEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the Sofar Inverter Modbus switch platform."""
|
||||
"""Set up the Sofar switch platform."""
|
||||
runtime_data = entry.runtime_data
|
||||
served = runtime_data.served_components
|
||||
async_add_entities(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Tests for the Sofar Inverter Modbus integration."""
|
||||
"""Tests for the Sofar integration."""
|
||||
|
||||
from modbus_connection.mock import MockModbusUnit
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Common fixtures for the Sofar Inverter Modbus tests."""
|
||||
"""Fixtures for the Sofar integration tests."""
|
||||
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
@@ -35,7 +35,7 @@ def mock_connection() -> MockModbusConnection:
|
||||
|
||||
@pytest.fixture
|
||||
def mock_config_entry() -> MockConfigEntry:
|
||||
"""Mock a Sofar Inverter Modbus config entry."""
|
||||
"""Mock a Sofar config entry."""
|
||||
return MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
unique_id=MOCK_SERIAL,
|
||||
@@ -50,7 +50,7 @@ async def init_integration(
|
||||
mock_config_entry: MockConfigEntry,
|
||||
mock_connection: MockModbusConnection,
|
||||
) -> MockConfigEntry:
|
||||
"""Set up the Sofar Inverter Modbus integration for testing."""
|
||||
"""Set up the Sofar integration for testing."""
|
||||
mock_config_entry.add_to_hass(hass)
|
||||
with patch(
|
||||
"homeassistant.components.sofar.async_get_unit",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus binary sensor platform."""
|
||||
"""Tests for the Sofar binary sensor platform."""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus button platform."""
|
||||
"""Tests for the Sofar button platform."""
|
||||
|
||||
from collections.abc import Callable, Sequence
|
||||
from unittest.mock import patch
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus config flow."""
|
||||
"""Tests for the Sofar config flow."""
|
||||
|
||||
from collections.abc import AsyncIterator, Callable
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus diagnostics."""
|
||||
"""Tests for the Sofar diagnostics."""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus integration setup and unload."""
|
||||
"""Tests for the Sofar integration setup and unload."""
|
||||
|
||||
from collections.abc import Callable
|
||||
from datetime import timedelta
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus select platform."""
|
||||
"""Tests for the Sofar select platform."""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus sensor platform."""
|
||||
"""Tests for the Sofar sensor platform."""
|
||||
|
||||
from collections.abc import Callable
|
||||
from datetime import timedelta
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus services."""
|
||||
"""Tests for the Sofar integration services."""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus switch platform."""
|
||||
"""Tests for the Sofar switch platform."""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Test the Sofar Inverter Modbus link tuning."""
|
||||
"""Tests for the Sofar link tuning."""
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
|
||||
Reference in New Issue
Block a user