From d4d8f74858ad80c30d319b5ed1e35139c94b073e Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 31 Mar 2021 10:31:12 +0200 Subject: [PATCH] Deprecate SolarEdge YAML configuration (#48533) --- CODEOWNERS | 1 + .../components/solaredge/__init__.py | 21 +++++++++++-------- .../components/solaredge/manifest.json | 4 ++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index e6fed9a83ef..70ea2385da8 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -433,6 +433,7 @@ homeassistant/components/smarttub/* @mdz homeassistant/components/smarty/* @z0mbieprocess homeassistant/components/sms/* @ocalvo homeassistant/components/smtp/* @fabaff +homeassistant/components/solaredge/* @frenck homeassistant/components/solaredge_local/* @drobtravels @scheric homeassistant/components/solarlog/* @Ernst79 homeassistant/components/solax/* @squishykid diff --git a/homeassistant/components/solaredge/__init__.py b/homeassistant/components/solaredge/__init__.py index bafc6b67f1c..e054abfe8ae 100644 --- a/homeassistant/components/solaredge/__init__.py +++ b/homeassistant/components/solaredge/__init__.py @@ -9,15 +9,18 @@ from homeassistant.helpers.typing import HomeAssistantType from .const import CONF_SITE_ID, DEFAULT_NAME, DOMAIN CONFIG_SCHEMA = vol.Schema( - { - DOMAIN: vol.Schema( - { - vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, - vol.Required(CONF_API_KEY): cv.string, - vol.Required(CONF_SITE_ID): cv.string, - } - ) - }, + vol.All( + cv.deprecated(DOMAIN), + { + DOMAIN: vol.Schema( + { + vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, + vol.Required(CONF_API_KEY): cv.string, + vol.Required(CONF_SITE_ID): cv.string, + } + ) + }, + ), extra=vol.ALLOW_EXTRA, ) diff --git a/homeassistant/components/solaredge/manifest.json b/homeassistant/components/solaredge/manifest.json index f0a620021ad..5cfe773d98c 100644 --- a/homeassistant/components/solaredge/manifest.json +++ b/homeassistant/components/solaredge/manifest.json @@ -4,6 +4,6 @@ "documentation": "https://www.home-assistant.io/integrations/solaredge", "requirements": ["solaredge==0.0.2", "stringcase==1.2.0"], "config_flow": true, - "codeowners": [], - "dhcp": [{"hostname":"target","macaddress":"002702*"}] + "codeowners": ["@frenck"], + "dhcp": [{ "hostname": "target", "macaddress": "002702*" }] }