|
142 | 142 |
|
143 | 143 | 'widget_dashboard_head': """<!-- No head content -->""",
|
144 | 144 |
|
145 |
| - 'widget_dashboard_title_bar': """<span style="padding-right: 0.5em; font-size: {{each_widget.font_em_name}}em">{{each_widget.name}}</span>""", |
| 145 | + 'widget_dashboard_title_bar': """<span class="widget-title-bar" style="padding-right: 0.5em; font-size: {{each_widget.font_em_name}}em">{{each_widget.name}}</span>""", |
146 | 146 |
|
147 | 147 | 'widget_dashboard_body': """
|
148 | 148 | {%- set device_id = widget_options['measurement'].split(",")[0] -%}
|
|
152 | 152 |
|
153 | 153 | {%- for each_input in input if each_input.unique_id == device_id and measurement_id in device_measurements_dict -%}
|
154 | 154 |
|
155 |
| - <span style="font-size: {{widget_options['font_em_value']}}em" id="value-{{each_widget.unique_id}}"></span><span style="font-size: {{widget_options['font_em_unit']}}em"> |
| 155 | + <span class="widget-measurement-value" style="font-size: {{widget_options['font_em_value']}}em" id="value-{{each_widget.unique_id}}"></span><span class="widget-measurement-unit" style="font-size: {{widget_options['font_em_unit']}}em"> |
156 | 156 | {%- if dict_measure_units[measurement_id] in dict_units and
|
157 | 157 | dict_units[dict_measure_units[measurement_id]]['unit'] and
|
158 | 158 | widget_options['enable_unit'] -%}
|
|
183 | 183 | {{')'}}
|
184 | 184 | {%- endif -%}
|
185 | 185 | {%- endfor -%}
|
186 |
| -
|
187 |
| - {%- for each_math in math if each_math.unique_id == device_id and measurement_id in device_measurements_dict -%} |
188 |
| -
|
189 |
| - <span style="font-size: {{widget_options['font_em_value']}}em" id="value-{{each_widget.unique_id}}"></span><span style="font-size: {{widget_options['font_em_unit']}}em"> |
190 |
| - {%- if dict_measure_units[measurement_id] in dict_units and |
191 |
| - dict_units[dict_measure_units[measurement_id]]['unit'] and |
192 |
| - widget_options['enable_unit'] -%} |
193 |
| - {{' ' + dict_units[dict_measure_units[measurement_id]]['unit']}} |
194 |
| - {%- endif -%} |
195 |
| - </span> |
196 |
| -
|
197 |
| - {%- if widget_options['enable_name'] or widget_options['enable_channel'] or widget_options['enable_measurement'] -%} |
198 |
| - <br/><span style="font-size: {{widget_options['font_em_timestamp']}}em"> |
199 |
| - {%- endif -%} |
200 |
| -
|
201 |
| - {%- if widget_options['enable_name'] -%} |
202 |
| - {{each_math.name + ' '}} |
203 |
| - {%- endif -%} |
204 |
| - {%- if widget_options['enable_channel'] or widget_options['enable_measurement'] -%} |
205 |
| - {{'('}} |
206 |
| - {%- endif -%} |
207 |
| - {%- if not device_measurements_dict[measurement_id].single_channel and widget_options['enable_channel'] -%} |
208 |
| - {{'CH' + (device_measurements_dict[measurement_id].channel|int)|string}} |
209 |
| - {%- endif -%} |
210 |
| - {%- if widget_options['enable_channel'] and widget_options['enable_measurement'] -%} |
211 |
| - {{', '}} |
212 |
| - {%- endif -%} |
213 |
| - {%- if widget_options['enable_measurement'] and device_measurements_dict[measurement_id].measurement -%} |
214 |
| - {{dict_measurements[device_measurements_dict[measurement_id].measurement]['name']}} |
215 |
| - {%- endif -%} |
216 |
| - {%- if widget_options['enable_channel'] or widget_options['enable_measurement'] -%} |
217 |
| - {{')'}} |
218 |
| - {%- endif -%} |
219 |
| - {%- endfor -%} |
220 | 186 |
|
221 | 187 | {%- for each_function in function if each_function.unique_id == device_id and measurement_id in device_measurements_dict -%}
|
222 | 188 |
|
|
413 | 379 | getLastDataMeasurement('{{each_widget.unique_id}}', '{{each_input.unique_id}}', 'input', '{{measurement_id}}', {{widget_options['measurement_max_age']}}, {{widget_options['decimal_places']}});
|
414 | 380 | repeatLastDataMeasurement('{{each_widget.unique_id}}', '{{each_input.unique_id}}', 'input', '{{measurement_id}}', {{widget_options['refresh_seconds']}}, {{widget_options['measurement_max_age']}}, {{widget_options['decimal_places']}});
|
415 | 381 | {%- endfor -%}
|
416 |
| -
|
417 |
| - {% for each_math in math if each_math.unique_id == device_id %} |
418 |
| - getLastDataMeasurement('{{each_widget.unique_id}}', '{{each_math.unique_id}}', 'math', '{{measurement_id}}', {{widget_options['measurement_max_age']}}, {{widget_options['decimal_places']}}); |
419 |
| - repeatLastDataMeasurement('{{each_widget.unique_id}}', '{{each_math.unique_id}}', 'math', '{{measurement_id}}', {{widget_options['refresh_seconds']}}, {{widget_options['measurement_max_age']}}, {{widget_options['decimal_places']}}); |
420 |
| - {%- endfor -%} |
421 | 382 |
|
422 | 383 | {% for each_function in function if each_function.unique_id == device_id %}
|
423 | 384 | getLastDataMeasurement('{{each_widget.unique_id}}', '{{each_function.unique_id}}', 'function', '{{measurement_id}}', {{widget_options['measurement_max_age']}}, {{widget_options['decimal_places']}});
|
|
0 commit comments