* Add Solar-Log sensor * Codeowners update * Update homeassistant/components/solarlog/manifest.json Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io> * remove sunwatcher from gen_requirements_all.py * remove sunwatcher from requirements_test_all.txt * Remove scan_interval as configuration variable I've set it to a fixed scan_interval of 1 minute. Removed the configuration option. * Fix black format * Config flow added (__init__.py) * Config flow added (manifest.json) * Config flow added (const.py) * Config flow added (config_flow.py) * Config flow added (strings.json) * Config flow added (en.json translation) * Config flow added (sensor.py rewritten) * Config flow added (sensor.py) * Config flow added (config_flows.py) * resolve conflict config_flows.py * Add tests * add tests * add tests * Update .coverage to include all files for solarlog * Fix await the unload * Adjust icons, add http:// to default host * Change icons * Add http:// to host if not provided, fix await * Add http:// to host if not provided, fix await * Adjust tests for http:// added to host * remove line * Remove without http:// requirement * Remove without http;// requirement
21 lines
637 B
Python
21 lines
637 B
Python
"""Solar-Log integration."""
|
|
from homeassistant.config_entries import ConfigEntry
|
|
from homeassistant.helpers.typing import HomeAssistantType
|
|
|
|
|
|
async def async_setup(hass, config):
|
|
"""Component setup, do nothing."""
|
|
return True
|
|
|
|
|
|
async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
|
"""Set up a config entry for solarlog."""
|
|
hass.async_create_task(
|
|
hass.config_entries.async_forward_entry_setup(entry, "sensor")
|
|
)
|
|
return True
|
|
|
|
|
|
async def async_unload_entry(hass, entry):
|
|
"""Unload a config entry."""
|
|
return await hass.config_entries.async_forward_entry_unload(entry, "sensor")
|