{{form_mod_output.csrf_token}} {{form_mod_output.output_id(class_='form-control', value=each_output.unique_id)}} {{form_mod_output.output_pin(class_='form-control', value=each_output.pin)}} {% set form = form_mod_output %} {% set dict_options = dict_outputs[each_output.output_type] %} {% set each_device = each_output %} {% set unique_id = each_output.unique_id %}
{% if 'output_manufacturer' in dict_outputs[each_output.output_type] %}
{{_("Manufacturer")}}: {{dict_outputs[each_output.output_type]['output_manufacturer']}}
{% endif %} {% if 'dependencies_module' in dict_outputs[each_output.output_type] and dict_outputs[each_output.output_type]['dependencies_module'] %}
{{_("Library")}}: {% for each_lib in dict_outputs[each_output.output_type]['dependencies_module'] -%} {%- if each_lib[0] == 'pip-pypi' -%} {%- if "==" in each_lib[2] -%} {{each_lib[2].split('==')[0]}} {%- else -%} {{each_lib[2]}} {%- endif -%} {%- else -%} {{each_lib[1]}} {%- endif -%} {%- if not loop.last %}, {% endif %} {% endfor %}
{% endif %} {% set manufacturer_url = 'url_manufacturer' in dict_outputs[each_output.output_type] and dict_outputs[each_output.output_type]['url_manufacturer'] %} {% set datasheet_url = 'url_datasheet' in dict_outputs[each_output.output_type] and dict_outputs[each_output.output_type]['url_datasheet'] %} {% set product_purchase_url = 'url_product_purchase' in dict_outputs[each_output.output_type] and dict_outputs[each_output.output_type]['url_product_purchase'] %} {% set additional_url = 'url_additional' in dict_outputs[each_output.output_type] and dict_outputs[each_output.output_type]['url_additional'] %} {% if manufacturer_url or datasheet_url or product_purchase_url or additional_url %}
{{_('Literature') + ': '}} {%- if manufacturer_url -%} {{_("Manufacturer")}} {% for each_url in dict_outputs[each_output.output_type]['url_manufacturer'] %}Link {{loop.index}}{{ ", " if not loop.last }}{% endfor %} {%- endif -%} {%- if datasheet_url -%} {% if manufacturer_url %}; {% endif -%} {{_("Datasheet")}} {% for each_url in dict_outputs[each_output.output_type]['url_datasheet'] %}Link {{loop.index}}{{ ", " if not loop.last }}{% endfor %} {%- endif -%} {%- if product_purchase_url -%} {% if manufacturer_url or datasheet_url %}; {% endif -%} {{_("Product")}} {% for each_url in dict_outputs[each_output.output_type]['url_product_purchase'] %}Link {{loop.index}}{{ ", " if not loop.last }}{% endfor %} {%- endif -%} {%- if additional_url -%} {% if manufacturer_url or datasheet_url or product_purchase_url %}; {% endif -%} {{_("Additional")}} {% for each_url in dict_outputs[each_output.output_type]['url_additional'] %}Link {{loop.index}}{{ ", " if not loop.last }}{% endfor %} {%- endif -%}.
{% endif %} {% if 'message' in dict_outputs[each_output.output_type] %}
{{dict_outputs[each_output.output_type]['message']|safe}}
{% endif %}
{% if each_output.output_type in custom_commands and custom_commands[each_output.output_type] %} {% set force_default_value = true %} {% set custom_options_values = none %}
{{_('Commands')}}

{% include 'pages/form_options/Custom_Actions_Message.html' %} {% if 'custom_commands' in dict_options %} {% for each_option in dict_options['custom_commands'] %} {% include 'pages/form_options/Custom_Options.html' %} {% endfor %} {% endif %}
{% endif %}
{{_('Options')}}

{{form_mod_output.name.label(class_='control-label')}}
{{form_mod_output.name(class_='form-control', value=each_output.name, **{'title': dict_translation['name']['phrase']})}}
{% if each_output.output_type != 'output_spacer' %}
{{form_mod_output.log_level_debug.label(class_='control-label')}}
{% include 'pages/form_options/Interface.html' %} {% include 'pages/form_options/GPIO.html' %} {% include 'pages/form_options/GPIO_Pin.html' %} {% include 'pages/form_options/Bluetooth.html' %} {% include 'pages/form_options/I2C.html' %} {% include 'pages/form_options/FTDI.html' %} {% include 'pages/form_options/UART.html' %} {% include 'pages/form_options/Baud_Rate.html' %} {% include 'pages/form_options/Location.html' %} {% include 'pages/form_options/Period.html' %} {% endif %}
{% set custom_options_values = custom_options_values_outputs %} {% if ('custom_options' in dict_options and custom_options_values[unique_id]) or 'custom_options_message' in dict_options %} {% set force_default_value = true %}
{{_('Custom Options')}}

{% if 'custom_options_message' in dict_options %} {% include 'pages/form_options/Custom_Options_Message.html' %} {% endif %} {% if 'custom_options' in dict_options %} {% for each_option in dict_options['custom_options'] %} {% include 'pages/form_options/Custom_Options.html' %} {% endfor %} {% endif %}
{% endif %} {% set output_channel = output_channel.query.filter(output_channel.output_id == each_output.unique_id).all() %} {%- set output_channel_exists = [] -%} {% for each_output_channel in output_channel %} {%- do output_channel_exists.append(1) -%} {% endfor %} {% if output_channel_exists %}
{{_('Channel Options')}}

{% endif %} {% set custom_options_values = custom_options_values_output_channels %} {% set dict_options = dict_outputs[each_output.output_type] %} {% set unique_id = each_output.unique_id %} {% set each_device = each_output %} {% set force_default_value = true %} {% set channel_options = true %} {% for each_output_channel in output_channel %} {% set channel = each_output_channel.channel %} {% set name_prefix = each_device.unique_id + "_" + channel|string + "_" %} {% if output_channel|length > 1 %}
Channel {{channel}} {%- if 'name' in custom_options_values[each_output.unique_id][channel] and custom_options_values[each_output.unique_id][channel]['name'] -%} {{': ' + custom_options_values[each_output.unique_id][channel]['name']}} {%- elif 'name' in dict_outputs[each_output.output_type]['channels_dict'][channel] -%} {{': ' + dict_outputs[each_output.output_type]['channels_dict'][channel]['name']}} {%- endif -%}
{% endif %} {% if custom_options_values[unique_id] %} {% if 'custom_channel_options_message' in dict_options %}
{{dict_options['custom_channel_options_message']|safe}}
{% endif %} {% if 'custom_channel_options' in dict_options %}
{% for each_option in dict_options['custom_channel_options'] %} {% include 'pages/form_options/Custom_Options.html' %} {% endfor %}
{% endif %} {% endif %} {% if 'button_send_duration' in dict_options['options_enabled'] or 'button_send_value' in dict_options['options_enabled'] or 'button_send_volume' in dict_options['options_enabled'] or 'button_send_duty_cycle' in dict_options['options_enabled'] %}
{% if 'button_send_duration' in dict_options['options_enabled'] %}
{% endif %} {% if 'button_send_value' in dict_options['options_enabled'] %}
{% endif %} {% if 'button_send_volume' in dict_options['options_enabled'] %}
{% endif %} {% if 'button_send_duty_cycle' in dict_options['options_enabled'] %}
{% endif %}
{% endif %} {% endfor %}