{% set all_measurements = table_device_measurements.query.filter( and_(table_device_measurements.device_id == each_device.unique_id, table_device_measurements.is_enabled)).all() %} {% if all_measurements %}
Configure Measurements
{% if 'measurements_rescale' in dict_options and dict_options['measurements_rescale'] %}
Rescaling: If rescaling, set the Rescaled Measurement to the new measurement and unit and the Rescale Method to {{_('Linear')}} or {{_('Equation')}}. {{_('Linear')}} rescaling requires the {{dict_translation['scale_to_min']['title']}} and {{dict_translation['scale_to_max']['title']}} options be set. {{_('Equation')}} rescaling requires the {{_('Equation')}} option be set, with the variable "x" being replaced with the measurement and the result of the calculation being stored in the database.
{% endif %} {% for each_measurement in all_measurements %} {% if each_measurement.measurement and each_measurement.measurement not in dict_measurements %}
Warning: Saved measurement with ID "{{each_measurement.measurement}}" not found in database. Add the missing unit on the Configure -> Measurement page or change the set measurement.
{% endif %} {% if each_measurement.unit and each_measurement.unit not in dict_units %}
Warning: Saved unit with ID "{{each_measurement.unit}}" not found in database. Add the missing unit on the Configure -> Measurement page or change the set unit.
{% endif %}
{% if each_measurement.unit and each_measurement.measurement %}
{% else %}
{% endif %}
{% if 'measurements_rescale' in dict_options and dict_options['measurements_rescale'] %}
{% endif %} {% if 'measurements_select_measurement_unit' in dict_options['options_enabled'] %}
{% else %}
{% endif %}
{% endfor %} {% endif %}