{% 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 %}
Select Measurements (required)
{% 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 %}