* Add inverter-devices * Minor code adjustments * Update manifest.json Seperate dependency upgrade to seperate PR * Update requirements_all.txt Seperate dependency upgrade to seperate PR * Update requirements_test_all.txt Seperate dependency upgrade to seperate PR * Update homeassistant/components/solarlog/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Split up base class, document SolarLogSensorEntityDescription * Split up sensor types * Update snapshot * Bump solarlog_cli to 0.2.1 * Add strict typing * Bump fyta_cli to 0.6.3 (#124574) * Ensure write access to hassrelease data folder (#124573) Co-authored-by: Robert Resch <robert@resch.dev> * Update a roborock blocking call to be fully async (#124266) Remove a blocking call in roborock * Add inverter-devices * Split up sensor types * Update snapshot * Bump solarlog_cli to 0.2.1 * Backport/rebase * Tidy up * Simplyfication coordinator.py * Minor adjustments * Ruff * Bump solarlog_cli to 0.2.2 * Update homeassistant/components/solarlog/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/solarlog/config_flow.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update homeassistant/components/solarlog/sensor.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Update persentage-values in fixture --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> Co-authored-by: Paulus Schoutsen <balloob@gmail.com> Co-authored-by: Robert Resch <robert@resch.dev> Co-authored-by: Allen Porter <allen@thebends.org>
21 lines
623 B
Python
21 lines
623 B
Python
"""Tests for the solarlog integration."""
|
|
|
|
from unittest.mock import patch
|
|
|
|
from homeassistant.const import Platform
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
async def setup_platform(
|
|
hass: HomeAssistant, config_entry: MockConfigEntry, platforms: list[Platform]
|
|
) -> MockConfigEntry:
|
|
"""Set up the SolarLog platform."""
|
|
config_entry.add_to_hass(hass)
|
|
|
|
with patch("homeassistant.components.solarlog.PLATFORMS", platforms):
|
|
await hass.config_entries.async_setup(config_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
|
|
return config_entry
|