mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
Move platform_integration_no_support issue to the homeassistant integration (#95927)
* Move platform_integration_no_support issue to the homeassistant integration * Update test * Improve repair text * Update test
This commit is contained in:
parent
84979f8e92
commit
86a397720f
@ -62,11 +62,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -314,11 +314,5 @@
|
|||||||
"smoke": "smoke",
|
"smoke": "smoke",
|
||||||
"sound": "sound",
|
"sound": "sound",
|
||||||
"vibration": "vibration"
|
"vibration": "vibration"
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,11 +21,5 @@
|
|||||||
"update": {
|
"update": {
|
||||||
"name": "Update"
|
"name": "Update"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,11 +32,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,11 +104,5 @@
|
|||||||
"temperature": { "name": "Target temperature" }
|
"temperature": { "name": "Target temperature" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,11 +76,5 @@
|
|||||||
"window": {
|
"window": {
|
||||||
"name": "Window"
|
"name": "Window"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,5 @@
|
|||||||
"_": {
|
"_": {
|
||||||
"name": "[%key:component::date::title%]"
|
"name": "[%key:component::date::title%]"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,11 +41,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,11 +52,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
"platform_only": {
|
"platform_only": {
|
||||||
"title": "The {domain} integration does not support YAML configuration under its own key",
|
"title": "The {domain} integration does not support YAML configuration under its own key",
|
||||||
"description": "The {domain} integration does not support configuration under its own key, it must be configured under its supported platforms.\n\nTo resolve this:\n\n1. Remove `{domain}:` from your YAML configuration file.\n\n2. Restart Home Assistant."
|
"description": "The {domain} integration does not support configuration under its own key, it must be configured under its supported platforms.\n\nTo resolve this:\n\n1. Remove `{domain}:` from your YAML configuration file.\n\n2. Restart Home Assistant."
|
||||||
|
},
|
||||||
|
"no_platform_setup": {
|
||||||
|
"title": "Unused YAML configuration for the {platform} integration",
|
||||||
|
"description": "It's not possible to configure {platform} {domain} by adding `{platform_key}` to the {domain} configuration. Please check the documentation for more information on how to set up this integration.\n\nTo resolve this:\n1. Remove `{platform_key}` occurences from the `{domain}:` configuration in your YAML configuration file.\n2. Restart Home Assistant.\n\nExample that should be removed:\n{yaml_example}\n"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"system_health": {
|
"system_health": {
|
||||||
|
@ -74,11 +74,5 @@
|
|||||||
"humidifier": {
|
"humidifier": {
|
||||||
"name": "[%key:component::humidifier::entity_component::_::name%]"
|
"name": "[%key:component::humidifier::entity_component::_::name%]"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,11 +86,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,11 +159,5 @@
|
|||||||
"receiver": {
|
"receiver": {
|
||||||
"name": "Receiver"
|
"name": "Receiver"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,11 +154,5 @@
|
|||||||
"wind_speed": {
|
"wind_speed": {
|
||||||
"name": "[%key:component::sensor::entity_component::wind_speed::name%]"
|
"name": "[%key:component::sensor::entity_component::wind_speed::name%]"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,5 @@
|
|||||||
"on": "[%key:common::state::on%]"
|
"on": "[%key:common::state::on%]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,11 +267,5 @@
|
|||||||
"wind_speed": {
|
"wind_speed": {
|
||||||
"name": "Wind speed"
|
"name": "Wind speed"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,11 +13,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,11 +30,5 @@
|
|||||||
"outlet": {
|
"outlet": {
|
||||||
"name": "Outlet"
|
"name": "Outlet"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,11 +27,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,5 @@
|
|||||||
"_": {
|
"_": {
|
||||||
"name": "[%key:component::time::title%]"
|
"name": "[%key:component::time::title%]"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,5 @@
|
|||||||
"firmware": {
|
"firmware": {
|
||||||
"name": "Firmware"
|
"name": "Firmware"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,11 +28,5 @@
|
|||||||
"returning": "Returning to dock"
|
"returning": "Returning to dock"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,5 @@
|
|||||||
"performance": "Performance"
|
"performance": "Performance"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,11 +74,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support": {
|
|
||||||
"title": "[%key:common::issues::platform_integration_no_support_title%]",
|
|
||||||
"description": "[%key:common::issues::platform_integration_no_support_description%]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ from homeassistant.const import (
|
|||||||
)
|
)
|
||||||
from homeassistant.core import (
|
from homeassistant.core import (
|
||||||
CALLBACK_TYPE,
|
CALLBACK_TYPE,
|
||||||
|
DOMAIN as HOMEASSISTANT_DOMAIN,
|
||||||
CoreState,
|
CoreState,
|
||||||
HomeAssistant,
|
HomeAssistant,
|
||||||
ServiceCall,
|
ServiceCall,
|
||||||
@ -216,16 +217,27 @@ class EntityPlatform:
|
|||||||
self.platform_name,
|
self.platform_name,
|
||||||
self.domain,
|
self.domain,
|
||||||
)
|
)
|
||||||
|
learn_more_url = None
|
||||||
|
if self.platform and "custom_components" not in self.platform.__file__: # type: ignore[attr-defined]
|
||||||
|
learn_more_url = (
|
||||||
|
f"https://www.home-assistant.io/integrations/{self.platform_name}/"
|
||||||
|
)
|
||||||
|
platform_key = f"platform: {self.platform_name}"
|
||||||
|
yaml_example = f"```yaml\n{self.domain}:\n - {platform_key}\n```"
|
||||||
async_create_issue(
|
async_create_issue(
|
||||||
self.hass,
|
self.hass,
|
||||||
self.domain,
|
HOMEASSISTANT_DOMAIN,
|
||||||
f"platform_integration_no_support_{self.domain}_{self.platform_name}",
|
f"platform_integration_no_support_{self.domain}_{self.platform_name}",
|
||||||
is_fixable=False,
|
is_fixable=False,
|
||||||
|
issue_domain=self.platform_name,
|
||||||
|
learn_more_url=learn_more_url,
|
||||||
severity=IssueSeverity.ERROR,
|
severity=IssueSeverity.ERROR,
|
||||||
translation_key="platform_integration_no_support",
|
translation_key="no_platform_setup",
|
||||||
translation_placeholders={
|
translation_placeholders={
|
||||||
"domain": self.domain,
|
"domain": self.domain,
|
||||||
"platform": self.platform_name,
|
"platform": self.platform_name,
|
||||||
|
"platform_key": platform_key,
|
||||||
|
"yaml_example": yaml_example,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -87,10 +87,6 @@
|
|||||||
"unknown_authorize_url_generation": "Unknown error generating an authorize URL.",
|
"unknown_authorize_url_generation": "Unknown error generating an authorize URL.",
|
||||||
"cloud_not_connected": "Not connected to Home Assistant Cloud."
|
"cloud_not_connected": "Not connected to Home Assistant Cloud."
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"platform_integration_no_support_title": "Platform support not supported",
|
|
||||||
"platform_integration_no_support_description": "The {platform} platform for the {domain} integration does not support platform setup.\n\nPlease remove it from your configuration and restart Home Assistant to fix this issue."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1477,11 +1477,19 @@ async def test_platform_with_no_setup(
|
|||||||
in caplog.text
|
in caplog.text
|
||||||
)
|
)
|
||||||
issue = issue_registry.async_get_issue(
|
issue = issue_registry.async_get_issue(
|
||||||
domain="mock-integration",
|
domain="homeassistant",
|
||||||
issue_id="platform_integration_no_support_mock-integration_mock-platform",
|
issue_id="platform_integration_no_support_mock-integration_mock-platform",
|
||||||
)
|
)
|
||||||
assert issue
|
assert issue
|
||||||
assert issue.translation_key == "platform_integration_no_support"
|
assert issue.issue_domain == "mock-platform"
|
||||||
|
assert issue.learn_more_url is None
|
||||||
|
assert issue.translation_key == "no_platform_setup"
|
||||||
|
assert issue.translation_placeholders == {
|
||||||
|
"domain": "mock-integration",
|
||||||
|
"platform": "mock-platform",
|
||||||
|
"platform_key": "platform: mock-platform",
|
||||||
|
"yaml_example": "```yaml\nmock-integration:\n - platform: mock-platform\n```",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
async def test_platforms_sharing_services(hass: HomeAssistant) -> None:
|
async def test_platforms_sharing_services(hass: HomeAssistant) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user