Created
May 28, 2021 19:16
-
-
Save chpego/7020e104b63456eac694ba7f8599eaf8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set mystates = states|selectattr('entity_id', 'in', state_attr('light.all', 'entity_id')) |selectattr('state', 'equalto', 'on') | list %} | |
{% set names = mystates | map(attribute='name') | list %} | |
{% set times = mystates | map(attribute='last_updated') | list %} | |
{% for i in range(mystates | length) %} | |
{{ names[i] }} depuis ( {{ as_timestamp(times[i])|timestamp_custom("%Hh:%M") }} ), | |
{%- endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Une version pour voir, depuis combien de temps les lumières ont changés d'état !