Revert "Return target in trigger description command (#156766)"

This reverts commit 343ea1b82d.
This commit is contained in:
Erik Montnemery
2025-11-19 07:58:17 +01:00
committed by GitHub
parent 82d3190016
commit f0981c00e5
2 changed files with 24 additions and 12 deletions

View File

@@ -805,8 +805,6 @@ async def async_get_all_descriptions(
continue continue
description = {"fields": yaml_description.get("fields", {})} description = {"fields": yaml_description.get("fields", {})}
if (target := yaml_description.get("target")) is not None:
description["target"] = target
new_descriptions_cache[missing_trigger] = description new_descriptions_cache[missing_trigger] = description

View File

@@ -647,9 +647,14 @@ async def test_async_get_all_descriptions(
"""Test async_get_all_descriptions.""" """Test async_get_all_descriptions."""
tag_trigger_descriptions = """ tag_trigger_descriptions = """
_: _:
target: fields:
entity: entity:
domain: alarm_control_panel selector:
entity:
filter:
domain: alarm_control_panel
supported_features:
- alarm_control_panel.AlarmControlPanelEntityFeature.ARM_HOME
""" """
assert await async_setup_component(hass, DOMAIN_SUN, {}) assert await async_setup_component(hass, DOMAIN_SUN, {})
@@ -739,14 +744,22 @@ async def test_async_get_all_descriptions(
} }
}, },
"tag": { "tag": {
"target": { "fields": {
"entity": [ "entity": {
{ "selector": {
"domain": ["alarm_control_panel"], "entity": {
} "filter": [
], {
}, "domain": ["alarm_control_panel"],
"fields": {}, "supported_features": [1],
}
],
"multiple": False,
"reorder": False,
},
},
},
}
}, },
} }
@@ -878,5 +891,6 @@ async def test_subscribe_triggers(
trigger.async_subscribe_platform_events(hass, good_subscriber) trigger.async_subscribe_platform_events(hass, good_subscriber)
assert await async_setup_component(hass, "sun", {}) assert await async_setup_component(hass, "sun", {})
assert trigger_events == [{"sun"}] assert trigger_events == [{"sun"}]
assert "Error while notifying trigger platform listener" in caplog.text assert "Error while notifying trigger platform listener" in caplog.text