Fix integrations.json
creation, make iot_standards
a list (#80945)
This commit is contained in:
parent
64eb316908
commit
36bb0bbc1a
6 changed files with 17 additions and 8 deletions
1
homeassistant/components/ultraloq/__init__.py
Normal file
1
homeassistant/components/ultraloq/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
"""Virtual integration: Ultraloq."""
|
|
@ -2,5 +2,5 @@
|
|||
"domain": "ultraloq",
|
||||
"name": "Ultraloq",
|
||||
"integration_type": "virtual",
|
||||
"iot_standard": "zwave"
|
||||
"iot_standards": ["zwave"]
|
||||
}
|
||||
|
|
|
@ -2368,6 +2368,7 @@
|
|||
"integrations": {
|
||||
"symfonisk": {
|
||||
"integration_type": "virtual",
|
||||
"supported_by": "sonos",
|
||||
"name": "IKEA SYMFONISK"
|
||||
},
|
||||
"tradfri": {
|
||||
|
@ -5607,6 +5608,9 @@
|
|||
"integrations": {
|
||||
"ultraloq": {
|
||||
"integration_type": "virtual",
|
||||
"iot_standards": [
|
||||
"zwave"
|
||||
],
|
||||
"name": "Ultraloq"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,6 +113,10 @@ def _populate_brand_integrations(
|
|||
metadata["config_flow"] = integration.config_flow
|
||||
if integration.iot_class:
|
||||
metadata["iot_class"] = integration.iot_class
|
||||
if integration.supported_by:
|
||||
metadata["supported_by"] = integration.supported_by
|
||||
if integration.iot_standards:
|
||||
metadata["iot_standards"] = integration.iot_standards
|
||||
if integration.translated_name:
|
||||
integration_data["translated_name"].add(domain)
|
||||
else:
|
||||
|
@ -185,8 +189,8 @@ def _generate_integrations(
|
|||
if integration.integration_type == "virtual":
|
||||
if integration.supported_by:
|
||||
metadata["supported_by"] = integration.supported_by
|
||||
if integration.iot_standard:
|
||||
metadata["iot_standard"] = integration.iot_standard
|
||||
if integration.iot_standards:
|
||||
metadata["iot_standards"] = integration.iot_standards
|
||||
else:
|
||||
metadata["config_flow"] = integration.config_flow
|
||||
if integration.iot_class:
|
||||
|
|
|
@ -263,9 +263,9 @@ VIRTUAL_INTEGRATION_MANIFEST_SCHEMA = vol.Schema(
|
|||
vol.Required("domain"): str,
|
||||
vol.Required("name"): str,
|
||||
vol.Required("integration_type"): "virtual",
|
||||
vol.Exclusive("iot_standard", "virtual_integration"): vol.Any(
|
||||
"homekit", "zigbee", "zwave"
|
||||
),
|
||||
vol.Exclusive("iot_standards", "virtual_integration"): [
|
||||
vol.Any("homekit", "zigbee", "zwave")
|
||||
],
|
||||
vol.Exclusive("supported_by", "virtual_integration"): str,
|
||||
}
|
||||
)
|
||||
|
|
|
@ -186,9 +186,9 @@ class Integration:
|
|||
return self.manifest.get("iot_class")
|
||||
|
||||
@property
|
||||
def iot_standard(self) -> str:
|
||||
def iot_standards(self) -> list[str]:
|
||||
"""Return the IoT standard supported by this virtual integration."""
|
||||
return self.manifest.get("iot_standard", {})
|
||||
return self.manifest.get("iot_standards", [])
|
||||
|
||||
def add_error(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""Add an error."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue