{%- set device_id = widget_options['output'].split(",")[0] -%} {%- set measurement_id = widget_options['output'].split(",")[1] -%} {%- set channel_id = widget_options['output'].split(",")[2] -%} {% set is_pwm = [] -%} {% set is_ezo_pump = [] -%} {% for each_output in output if each_output.unique_id == device_id %} {% if each_output.output_type in output_types['pwm'] %} {%- do is_pwm.append(1) %} {% elif each_output.output_type in ['atlas_ezo_pmp'] %} {%- do is_ezo_pump.append(1) %} {% endif %} {% endfor %}
{%- if widget_options['enable_value'] -%} {%- else -%} {%- endif -%} {%- if dict_measure_units[measurement_id] in dict_units and dict_units[dict_measure_units[measurement_id]]['unit'] and widget_options['enable_unit'] -%} {{' ' + dict_units[dict_measure_units[measurement_id]]['unit']}} {%- endif -%} {%- if widget_options['enable_value'] or widget_options['enable_unit'] -%}
{%- endif -%} {%- if widget_options['enable_timestamp'] -%} {%- else -%} {%- endif -%} {% if widget_options['enable_output_controls'] %}
{% if not is_pwm and not is_ezo_pump -%}
{%- endif %}
{% if is_pwm %}
{% else %}
{% if is_ezo_pump %} {%- if dict_measure_units[measurement_id] in dict_units and dict_units[dict_measure_units[measurement_id]]['name'] -%} {% endif %} {% else %} {% endif %}
{% endif %}
{% endif %}