Closed SdeGeata closed 1 year ago
The config-template-card
updates itself on every change of any of monitored entities.
It is NOT recommended to place the whole picture elements card into config-template-card
.
Use CTC card for a particular element only.
same as https://github.com/iantrich/config-template-card/issues/114 https://github.com/home-assistant/frontend/issues/14269
I realize that, but there was no change of entity states, as you can see by the video. It just flickers every few seconds on its own. This behaviour never happened before the update. I'll look into your CTC card suggestion, but please look into this behaviour on your end too.
but please look into this behaviour on your end too.
I am a user like you. Just trying to follow recommendations.
Yeah, all my other research told me the same as you did. I ended up downgrading HA CORE to the previous version.On Nov 6, 2022, at 1:42 PM, ildar170975 @.***> wrote:
but please look into this behaviour on your end too.
I am a user like you. Just trying to follow recommendations.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
I realize that, but there was no change of entity states, as you can see by the video. It just flickers every few seconds on its own. This behaviour never happened before the update. I'll look into your CTC card suggestion, but please look into this behaviour on your end too.
Excuse for my intrusion: What means "CTC Card" ?
thank
@marcodb82
”CTC card” is Config-Template-Card. It is mentioned in the posts above.
I tried to submit a PR with a fix (or at least a "workaround") for this issue, we're still discussing on it...
However, I'm migrating away from config-template-card
and I started using card-mod
which is not affected by this issue, seems less demanding on the browser side and also has a more standard templating syntax.
Basically I am changing configurations like this (which is a part of a picture-elements
):
- type: custom:config-template-card
entities:
- light.hue_go_new_2
element:
type: image
image: /local/casa/rotated7/Casa3D_rotated7_light_hue_go_new_2_MASK.png?a2
entity: light.hue_go_new_2
tap_action:
action: none
hold_action:
action: none
style:
opacity: >-
${ ( states["light.hue_go_new_2"].attributes.brightness ?
states["light.hue_go_new_2"].attributes.brightness / 255 : 0) -
(states["light.hue_go_new_2"].attributes.hs_color ?
states["light.hue_go_new_2"].attributes.hs_color[1]/90 : 0)}
mix-blend-mode: lighten
top: 0%
left: 0%
transform: none
into configurations like this:
- type: image
image: /local/casa/rotated7/Casa3D_rotated7_light_hue_go_new_2_MASK.png?a2
entity: light.hue_go_new_2
tap_action:
action: none
hold_action:
action: none
style:
mix-blend-mode: lighten
top: 0%
left: 0%
transform: none
card_mod:
style: |
:host {
opacity: {{ (state_attr("light.hue_go_new_2","brightness")|float/255 if state_attr("light.hue_go_new_2","brightness") else 0) - (state_attr("light.hue_go_new_2","hs_color")[1]|float/90 if state_attr("light.hue_go_new_2","hs_color") else 0) }};
}
@smonesi using card-mod is a nice idea, I tested it but ran into an issue with the light state. It works well initially but once I turn off the light (state != 'on') and on again the card-mod style does not update anymore. Did you encounter this issue as well or is your example working for you?
I used it with a colored hue light like this (works well until I turn the light off and on again):
- type: picture-elements
image: /local/ui/floorplan/night.png
elements:
- type: image
image: /local/ui/floorplan/lights/hallway_living_on.png
entity: light.hallway_1
tap_action:
action: none
hold_action:
action: none
style:
mix-blend-mode: lighten
transform: none
width: 100%
height: 100%
top: 0
left: 0
card_mod:
style: |
:host {
opacity: {{ (state_attr(config.entity, 'brightness') / 255) if is_state(config.entity, 'on') else 0.0 }};
filter: {{ 'hue-rotate(' + ((state_attr(config.entity, 'hs_color')[0] - 45)|string if state_attr(config.entity, 'hs_color') else 0) + 'deg)' }};
}
I also played around with the state_filter as it changes some other styles.. but didn't make a difference
Edit: It seems like the component is loosing its connection to the change events, the console logs:
core.327e9f9f.js:1 Received event for unknown subscription 35. Unsubscribing.
After I turned off and on the light and then change brightness or color..
Found the issue:
filter: {{ 'hue-rotate(' + ((state_attr(config.entity, 'hs_color')[0] - 45)|string if state_attr(config.entity, 'hs_color') else 0) + 'deg)' }};
the string concatenation with 0 (int) in the else branch didn't work... so changing to
filter: {{ 'hue-rotate(' + ((state_attr(config.entity, 'hs_color')[0] - 45)|string if state_attr(config.entity, 'hs_color') else '0') + 'deg)' }};
did the trick.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Checklist
Describe the issue you are experiencing
Greetings;
I just finished updating to the latest Home Assistant Core and Supervisor and have since noticed a "flicker" on a picture elements card. It is a single card in panel mode and the card had no issues before the latest update.
I have attached a video that shows the buggy effect.
Home Assistant 2022.11.1 Supervisor 2022.10.2 Operating System 9.2 Frontend 20221102.1 - latest
https://user-images.githubusercontent.com/5808871/200147742-ce6ba09d-3937-4402-bd74-63039c396946.mov
Describe the behavior you expected
Expected behaviour? I expect my card to not flicker every few seconds.
Steps to reproduce the issue
What version of Home Assistant Core has the issue?
2022.11.1
What was the last working version of Home Assistant Core?
2022.10.5
In which browser are you experiencing the issue with?
Home Assistant Companion 2022.10 (2022.398), Google Chrome Version 94.0.4606.81 (Official Build) (x86_64), Apple Safari Version 15.3 (15612.4.9.1.8, 15612)
Which operating system are you using to run this browser?
MacOS 10.15.7, iOS 16.2
State of relevant entities
No response
Problem-relevant frontend configuration
Javascript errors shown in your browser console/inspector
Additional information
Video is attached in first field.