Any change on this? Or is there some faster and reliable alternative to get the LastCalled information?
I’m using the Alexa Media Player (5.7.1) integration with 14 Alexa devices, but it is neither reliable (sometimes Alexa activity won’t be recognized) nor fast (takes up to 10 minutes to get the update) for me.
Strange, how do you go about it? The answer comes within a few seconds. However, I “only” have 7 devices. Very rarely does the answer come on the wrong device. It’s been like this here for a year.
Just the template sensor from the wiki, that’s enough. I use the DIY skill to activate the scripts via Alexa routine.
template:
- sensor:
- name: Last Alexa
state: |-
{{ expand(integration_entities('alexa_media') | select('search', 'media_player'))
| selectattr('attributes.last_called', 'eq', True) | map(attribute='entity_id') | first }}
availability: |-
{{ expand(integration_entities('alexa_media') | select('search', 'media_player'))
| selectattr('attributes.last_called','eq',True) | first is defined }}
Thats all. Look here. I have simply adopted this. But I’m not an expert either. But it works perfectly.
There you will also find lots of examples of what such scripts could look like.
Edit: I think you also have wrong indentations. And why so many sensors?
Just out of curiosity I also just tested it (on 5.7.1) and mine never updated and when it finally did it was from an hour ago. Not sure why some people are having better success than others?!