1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-30 04:05:01 +01:00

Update documentation link to point to each domain/platform (#171734)

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Petro31
2026-05-21 12:47:39 -04:00
committed by GitHub
parent 1858649bc7
commit a02e54f332
3 changed files with 25 additions and 32 deletions
@@ -19,8 +19,6 @@ CONF_TURN_ON = "turn_on"
DOMAIN = "template"
DOCUMENTATION_URL = "https://www.home-assistant.io/integrations/template/"
PLATFORM_STORAGE_KEY = "template_platforms"
PLATFORMS = [
+21 -14
View File
@@ -29,13 +29,9 @@ from homeassistant.helpers.entity_platform import (
from homeassistant.helpers.script import async_validate_actions_config
from homeassistant.helpers.singleton import singleton
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from homeassistant.util import slugify
from .const import (
CONF_ADVANCED_OPTIONS,
CONF_DEFAULT_ENTITY_ID,
DOCUMENTATION_URL,
DOMAIN,
)
from .const import CONF_ADVANCED_OPTIONS, CONF_DEFAULT_ENTITY_ID, DOMAIN
from .entity import AbstractTemplateEntity
from .template_entity import TemplateEntity
from .trigger_entity import TriggerEntity
@@ -166,6 +162,24 @@ async def validate_template_scripts(
)
def async_create_platform_template_not_supported_issue(
hass: HomeAssistant, domain: str
):
"""Create a platform: template not supported issue."""
learn_more_url = (
"https://www.home-assistant.io/integrations/template/"
f"#{slugify(domain, separator='-')}"
)
async_create_platform_config_not_supported_issue(
hass,
DOMAIN,
domain,
yaml_config_under_integration_supported=True,
learn_more_url=learn_more_url,
logger=_LOGGER,
)
async def async_setup_template_platform(
hass: HomeAssistant,
domain: str,
@@ -179,14 +193,7 @@ async def async_setup_template_platform(
"""Set up the Template platform."""
if discovery_info is None:
# Legacy Configuration
async_create_platform_config_not_supported_issue(
hass,
DOMAIN,
domain,
yaml_config_under_integration_supported=True,
learn_more_url=DOCUMENTATION_URL,
logger=_LOGGER,
)
async_create_platform_template_not_supported_issue(hass, domain)
return
# Trigger Configuration
+4 -16
View File
@@ -46,7 +46,6 @@ from homeassistant.helpers import config_validation as cv, template
from homeassistant.helpers.entity_platform import (
AddConfigEntryEntitiesCallback,
AddEntitiesCallback,
async_create_platform_config_not_supported_issue,
)
from homeassistant.helpers.restore_state import ExtraStoredData, RestoreEntity
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
@@ -57,15 +56,11 @@ from homeassistant.util.unit_conversion import (
TemperatureConverter,
)
from . import DOMAIN, TriggerUpdateCoordinator, validators as template_validators
from .const import (
CONF_AVAILABILITY,
CONF_AVAILABILITY_TEMPLATE,
CONF_PICTURE,
DOCUMENTATION_URL,
)
from . import TriggerUpdateCoordinator, validators as template_validators
from .const import CONF_AVAILABILITY, CONF_AVAILABILITY_TEMPLATE, CONF_PICTURE
from .entity import AbstractTemplateEntity
from .helpers import (
async_create_platform_template_not_supported_issue,
async_setup_template_entry,
async_setup_template_platform,
async_setup_template_preview,
@@ -279,14 +274,7 @@ async def async_setup_platform(
# Rewrite the configuration options to modern keys.
if discovery_info is None:
async_create_platform_config_not_supported_issue(
hass,
DOMAIN,
WEATHER_DOMAIN,
yaml_config_under_integration_supported=True,
learn_more_url=DOCUMENTATION_URL,
logger=_LOGGER,
)
async_create_platform_template_not_supported_issue(hass, WEATHER_DOMAIN)
return
# Modern and Trigger