mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 01:11:51 -04:00
alexa_devices: add person details to voice event (#182410)
This commit is contained in:
@@ -96,6 +96,8 @@ class AlexaVoiceEvent(AmazonEntity, EventEntity):
|
||||
"intent": vocal_record.intent,
|
||||
"voice_command": vocal_record.title,
|
||||
"voice_reply": vocal_record.sub_title,
|
||||
"person_first_name": vocal_record.person_first_name,
|
||||
"person_type": vocal_record.person_type,
|
||||
},
|
||||
)
|
||||
self.async_write_ha_state()
|
||||
|
||||
@@ -127,6 +127,8 @@ TEST_VOCAL_RECORD_INITIAL = AmazonVocalRecord(
|
||||
intent="PlayMusicIntent",
|
||||
title="Play some music",
|
||||
sub_title="Echo Test",
|
||||
person_first_name="John",
|
||||
person_type="CHILD",
|
||||
)
|
||||
|
||||
TEST_VOCAL_RECORD_EVENT = AmazonVocalRecord(
|
||||
@@ -135,4 +137,6 @@ TEST_VOCAL_RECORD_EVENT = AmazonVocalRecord(
|
||||
intent="PlayMusicIntent",
|
||||
title="Play some music",
|
||||
sub_title="Echo Test",
|
||||
person_first_name="Jane",
|
||||
person_type="ADULT",
|
||||
)
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
]),
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Echo Test Voice event',
|
||||
'intent': 'PlayMusicIntent',
|
||||
'person_first_name': 'Jane',
|
||||
'person_type': 'ADULT',
|
||||
'voice_command': 'Play some music',
|
||||
'voice_reply': 'Echo Test',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user