Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96121

Template-Entity-Row momentarily displays its templates

$
0
0

@123 wrote:

I’m using the latest version of Thomas Loven’s Template-Entity-Row (i.e. the version that supports tap_action) and noticed what appears to be a rendering artifact.

When the browser page is refreshed, using either F5 or CTRL+F5, for a very brief instant the templates (for state and secondary) are displayed on the screen. In other words, you see the raw templates for a fraction of a second before you see the result of the templates.

Once you know it can happen, it’s hard not to notice its presence during a page refresh (or when the page is first displayed). It’s evident in 0.106.5 and also in 0.107.0.

Here’s the relevant portion of my ui-lovelace.yaml file:

views:
  - title: Overview
    icon: mdi:home
    cards:
      - type: entities
        show_header_toggle: false
        entities:
          - type: custom:template-entity-row
            entity: climate.thermostat
            state: "{{state_attr(config.entity, 'hvac_action') | title}}  {{state_attr(config.entity, 'current_temperature')}} °C"
            secondary: "{{states(config.entity) | title}} {{state_attr(config.entity, 'temperature')}} °C"
            tap_action:
              action: more-info

Here are several frames from a screen recording, showing the progression of the UI being rendered. The rendering happens quickly, nevertheless the templates are clearly visible for a very brief moment.

  • The first Thermostat is a standard entities card (it serves as the “control” in this experiment).
  • The second Thermostat is also an entities card but with template-entity-row.

Frame 1: Most cards are incomplete at this stage. The templates are clearly visible.

Frame 2: Some cards are partially rendered. The Template-Entity-Row card appears to be complete now.

Frame 3: Most cards are rendered. The templates reappear.

Frame 4: All cards are now fully rendered.

Is this considered to be normal behavior or is it a bug?


EDIT
Tested with Firefox 74.0 on Ubuntu 18.04.4 LTS

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 96121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>