mirror of
https://github.com/home-assistant/core.git
synced 2025-11-23 01:36:57 +00:00
Revert "Return target in trigger description command (#156766)"
This reverts commit 343ea1b82d.
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user