{% 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 %}
{% endfor %}
{% endif %}