Hello Community.
I have a dashboard with a custom:button-card and many gif-overlays shown in several conditions, this is the beginning as an introduction:
views:
- title: Home
type: custom:button-card
show_state: false
tap_action:
action: none
custom_fields:
house:
card:
border: none
border-width: 0px !important;
image: /local/grey.jpg
panel: true
type: picture-elements
elements:
- type: conditional
conditions:
- entity: input_select.tabletviewhelper
state: House
elements:
- type: conditional
conditions:
- entity: sun.sun
state: above_horizon
elements:
- type: conditional
conditions:
- condition: state
entity: switch.pillars
state:
- 'off'
- unavailable
elements:
- type: image
The gifs shown at the foremost layer are updated when the condion has changed and ONLY this gif is updated. In the following example I can see sometimes a minor “flicker” when I switch entity: switch.wallbigdoor from on to off and vice versa:
- type: conditional
conditions:
- entity: switch.wallbigdoor
state: 'on'
elements:
- type: image
image: >
[[[
return ('/local/blenderhouse/outside_wall_big_door_day_nolamp_' +
Math.trunc(states['input_number.bigdoormotion'].state).toString() +
'.gif');
]]]
style:
top: 267px
left: 400px
width: 800px
height: 534px
- type: conditional
conditions:
- entity: switch.wallbigdoor
state: 'off'
elements:
- type: image
image: >
[[[
return ('/local/blenderhouse/outside_wall_big_door_day_nolamp_' +
Math.trunc(states['input_number.bigdoormotion'].state).toString() +
'.gif');
]]]
style:
top: 267px
left: 400px
width: 800px
height: 534px
In the example above I have now a javascript to build the name of a gif, I want to make an animation of 30 different gifs.
My problem is that the whole DASHBOARD! is updated when input_number.bigdoormotion has changed. Including alle the other cards on the right and bottom. A complex task. (I have attached the screenshot)
To me it seems like there is some kind of, let’s call it a “tree” of components/images and a monitor is registered on a level so that only the relevant elements are updated. But the helper-entity in the js is registered on the root.
Is it a valid description of the behaviour I experienced? I hope somebody can follow me.
The update of the whole thing makes the dashboard so “nervous flickering” that I cannot use it. As an alternative I can use conditions 0 to 30 for each gif, then the update is only done in that area. But… that may mean 31 x NNN mor e lines of code on 4 locations and sounds to me like some stupid overhead.
Is there a way to influence the level of monitoring entity-changes (just in case my assumptins are correct )
Thanks in advance, kindest regards Jörg