Add repair issue for Coinbase YAML (#80156)
This commit is contained in:
parent
4dd0c079d5
commit
faef09d3d7
3 changed files with 22 additions and 1 deletions
|
@ -11,7 +11,7 @@ import voluptuous as vol
|
|||
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
||||
from homeassistant.const import CONF_API_KEY, CONF_API_TOKEN, Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import entity_registry
|
||||
from homeassistant.helpers import entity_registry, issue_registry as ir
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
from homeassistant.util import Throttle
|
||||
|
@ -54,6 +54,15 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
|||
"""Set up the Coinbase component."""
|
||||
if DOMAIN not in config:
|
||||
return True
|
||||
ir.async_create_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"remove_yaml",
|
||||
breaks_in_ha_version="2022.12.0",
|
||||
is_fixable=False,
|
||||
severity=ir.IssueSeverity.WARNING,
|
||||
translation_key="removed_yaml",
|
||||
)
|
||||
hass.async_create_task(
|
||||
hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
|
|
|
@ -38,5 +38,11 @@
|
|||
"currency_unavailable": "One or more of the requested currency balances is not provided by your Coinbase API.",
|
||||
"exchange_rate_unavailable": "One or more of the requested exchange rates is not provided by Coinbase."
|
||||
}
|
||||
},
|
||||
"issues": {
|
||||
"removed_yaml": {
|
||||
"title": "The Coinbase YAML configuration has been removed",
|
||||
"description": "Configuring Coinbase using YAML has been removed.\n\nYour existing YAML configuration is not used by Home Assistant.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"issues": {
|
||||
"removed_yaml": {
|
||||
"description": "Configuring Coinbase using YAML has been removed.\n\nYour existing YAML configuration is not used by Home Assistant.\n\nRemove the YAML configuration from your configuration.yaml file and restart Home Assistant to fix this issue.",
|
||||
"title": "The Coinbase YAML configuration has been removed"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"error": {
|
||||
"currency_unavailable": "One or more of the requested currency balances is not provided by your Coinbase API.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue