EVcharge_PRO: WIP1

This commit is contained in:
2025-09-17 23:43:52 +02:00
parent b5bc58e98a
commit 074737e6b4
3 changed files with 334 additions and 20 deletions

View File

@@ -1,27 +1,27 @@
{# This macro returns _power entity for a controlled plug device #}
{% macro getpower_id(evcharge_id) %}
{% set attrib_list = device_entities( device_id (evcharge_id ) ) %}
{% macro getpower_id(evcharge_id) %}
{% set attrib_list = device_entities( device_id (evcharge_id ) ) %}
{% for attrib in attrib_list -%}
{% if ( attrib | regex_search('power$')) -%}
{{ attrib }}
{%- endif %}
{%- endfor %}
{% endmacro %}
{% for attrib in attrib_list -%}
{% if ( attrib | regex_search('power$')) -%}
{{ attrib }}
{%- endif %}
{%- endfor %}
{% endmacro %}
{########################################################################}
{########################################################################}
{# This macro returns _energy entity for a controlled plug device #}
{# This macro returns _energy entity for a controlled plug device #}
{% macro getenergy_id(evcharge_id) %}
{% set attrib_list = device_entities( device_id (evcharge_id ) ) %}
{% for attrib in attrib_list -%}
{% if ( attrib | regex_search('energy$')) -%}
{{ attrib }}
{%- endif %}
{%- endfor %}
{% endmacro %}
{% macro getenergy_id(evcharge_id) %}
{% set attrib_list = device_entities( device_id (evcharge_id ) ) %}
{% for attrib in attrib_list -%}
{% if ( attrib | regex_search('energy$')) -%}
{{ attrib }}
{%- endif %}
{%- endfor %}
{% endmacro %}