Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sensors:
- max_paces_entity:
- unique_id: 0b1808b31fbe4ead98793def5960f046
- friendly_name: Entity of the one with the most paces
- value_template: >-
- {%- set ns = namespace(entity_id="", previous_value=0) -%}
- {%- set group = "group.birthdays" -%}
- {% for max_paces_entity in state_attr(group, 'entity_id') if states(max_paces_entity) | int > ns.previous_value -%}
- {%- set ns.entity_id = max_paces_entity -%}
- {%- set ns.previous_value = states(max_paces_entity) | int -%}
- {% endfor -%}
- {{ ns.entity_id }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement