1
0

Add info how to list batteries entities

This commit is contained in:
Przemek Grondek 2023-12-16 01:48:00 +01:00
parent a884e69199
commit 2d06a42a8c

12
HELP.md
View File

@ -19,3 +19,15 @@ You need to enable node_status for each device, and they need to have `node_stat
{% endfor %} {% endfor %}
{{ ns.result }} {{ ns.result }}
``` ```
# List batteries entities
```
{% set ns = namespace(below=[]) %}
{% for s in states.sensor
if s.entity_id is search('battery') and s.state != 'unknown'
%}
{% set ns.below = ns.below + [s.entity_id] %}
{% endfor %}
{{ ns.below |sort| join(', ') }}
```