Hello. I have a routine that is triggered from my Google Home minis/nest, and I need to know witch media_player was used to trigger the routine, is this possible?
At least, as an assumption, I could use the .last_changed
attribute to find out witch one has used, but how can I get the entity_id of the the sensor that has the “minimum” value of that attribute (closest to now()
- probably the highest)?
Having this list:
{% set colunas = ['media_player.coluna_da_sala','media_player.coluna_da_cozinha','media_player.coluna_da_cave'] %}
How can I get the entity_id
of the one that was .last_changed
?
Probably pretty basic, but I could not find a direct solution for this other than comparing one by one… any help, please? Thanks in advance!