mirror of
https://github.com/elisspace/core.git
synced 2026-09-28 13:30:06 +00:00
Fix trigger template entities without a unique ID (#48631)
This commit is contained in:
@@ -1014,7 +1014,15 @@ async def test_trigger_entity(hass):
|
||||
"attribute_templates": {
|
||||
"plus_one": "{{ trigger.event.data.beer + 1 }}"
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"trigger": [],
|
||||
"sensors": {
|
||||
"bare_minimum": {
|
||||
"value_template": "{{ trigger.event.data.beer }}"
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -1027,6 +1035,10 @@ async def test_trigger_entity(hass):
|
||||
assert state is not None
|
||||
assert state.state == STATE_UNKNOWN
|
||||
|
||||
state = hass.states.get("sensor.bare_minimum")
|
||||
assert state is not None
|
||||
assert state.state == STATE_UNKNOWN
|
||||
|
||||
context = Context()
|
||||
hass.bus.async_fire("test_event", {"beer": 2}, context=context)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
Reference in New Issue
Block a user