mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Don't show withings repair if it's not in YAML (#101054)
This commit is contained in:
parent
081f194f6a
commit
ad8033c0f2
@ -76,29 +76,30 @@ CONFIG_SCHEMA = vol.Schema(
|
|||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up the Withings component."""
|
"""Set up the Withings component."""
|
||||||
|
|
||||||
async_create_issue(
|
if conf := config.get(DOMAIN):
|
||||||
hass,
|
async_create_issue(
|
||||||
HOMEASSISTANT_DOMAIN,
|
|
||||||
f"deprecated_yaml_{DOMAIN}",
|
|
||||||
breaks_in_ha_version="2024.4.0",
|
|
||||||
is_fixable=False,
|
|
||||||
issue_domain=DOMAIN,
|
|
||||||
severity=IssueSeverity.WARNING,
|
|
||||||
translation_key="deprecated_yaml",
|
|
||||||
translation_placeholders={
|
|
||||||
"domain": DOMAIN,
|
|
||||||
"integration_title": "Withings",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
if CONF_CLIENT_ID in config:
|
|
||||||
await async_import_client_credential(
|
|
||||||
hass,
|
hass,
|
||||||
DOMAIN,
|
HOMEASSISTANT_DOMAIN,
|
||||||
ClientCredential(
|
f"deprecated_yaml_{DOMAIN}",
|
||||||
config[CONF_CLIENT_ID],
|
breaks_in_ha_version="2024.4.0",
|
||||||
config[CONF_CLIENT_SECRET],
|
is_fixable=False,
|
||||||
),
|
issue_domain=DOMAIN,
|
||||||
|
severity=IssueSeverity.WARNING,
|
||||||
|
translation_key="deprecated_yaml",
|
||||||
|
translation_placeholders={
|
||||||
|
"domain": DOMAIN,
|
||||||
|
"integration_title": "Withings",
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
if CONF_CLIENT_ID in conf:
|
||||||
|
await async_import_client_credential(
|
||||||
|
hass,
|
||||||
|
DOMAIN,
|
||||||
|
ClientCredential(
|
||||||
|
conf[CONF_CLIENT_ID],
|
||||||
|
conf[CONF_CLIENT_SECRET],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user