mirror of
https://github.com/home-assistant/core
synced 2024-07-30 21:18:57 +02:00
![indykoning](/assets/img/avatar_default.png)
* Growatt Server Config flow * Use reference strings Co-authored-by: SNoof85 <snoof85@gmail.com> * Remove configuration.yaml import logic * Removed import test * Re-added PLATFORM_SCHEMA validation * Import yaml from old yaml configuration * Apply suggestions from code review Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Feedback * Use Executor for IO only * Fix imports * update requirements * Fix flake8 * Run every section of fetching devices in single executor * Config flow feedback * Clean up * Fix plan step * Fix config flow test * Remove duplicate test * Test import step * Test already configured entry * Clean up tests * Add asserts * Mock out entry setup * Add warning if set up via yaml Co-authored-by: SNoof85 <snoof85@gmail.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
20 lines
546 B
Python
20 lines
546 B
Python
"""The Growatt server PV inverter sensor integration."""
|
|
from homeassistant import config_entries
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from .const import PLATFORMS
|
|
|
|
|
|
async def async_setup_entry(
|
|
hass: HomeAssistant, entry: config_entries.ConfigEntry
|
|
) -> bool:
|
|
"""Load the saved entities."""
|
|
|
|
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
|
|
return True
|
|
|
|
|
|
async def async_unload_entry(hass, entry):
|
|
"""Unload a config entry."""
|
|
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|