frontend icon indicating copy to clipboard operation
frontend copied to clipboard

After update to 2022.11, picture-elements card not responding to change in state_image

Open fonske opened this issue 2 years ago • 12 comments

The problem

I have a picture elements card, that show different state_image according to the salt level. This is not working anymore after update tot 2022.11. I have installed on a second HA system a previous backup, with 2022.10.5 and there was no issue with the animation of the card.

See attached links to the two different versions of HA. See the sensor salt_level wich will change the picture in the picture elements card. 2022.11.1: https://tweakers.net/fotoalbum/image/XoF1mueWJi1plJjwZgKZX1o2.jpg 2022.10.5: https://tweakers.net/fotoalbum/image/KQYLxk0A5qw0ZNYe2IYT7xBD.jpg

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

What type of installation are you running?

Home Assistant OS

Integration causing the issue

picture elements card

Link to integration documentation on our website

https://www.home-assistant.io/dashboards/picture-elements/#how-to-use-state_image

Diagnostics information

No response

Example YAML snippet

elements:
  - entity: sensor.salt_level
    image: local/images/softener.png
    state_image:
      softener_100: local/images/softener100.png
      softener_80: local/images/softener80.png
      softener_60: local/images/softener60.png
      softener_40: local/images/softener40.png
      softener_20: local/images/softener20.png
      softener_10: local/images/softener10.png
      softener_0: local/images/softener0.png
      'off': local/images/softener0.png
    style:
      left: 0%
      top: 0%
      transform: scale(1,1)
    tap_action:
      action: none
    type: image
image: local/images/softener.png
panel: true
type: picture-elements

Anything in the logs that might be useful for us?

Found no errors in the log about this issue

Additional information

The yaml file that calls the different states

# Saltlevel animation picture on dashboard           
    - name: "Salt level"
      state: >
        {% if states('sensor.clack_procent')|float > 80 %}
          softener_100
        {% elif states('sensor.clack_procent')|float > 65 and states('sensor.clack_procent')|float <= 80 %}
          softener_80
        {% elif states('sensor.clack_procent')|float > 40 and states('sensor.clack_procent')|float <= 65 %}
          softener_60
        {% elif states('sensor.clack_procent')|float > 20 and states('sensor.clack_procent')|float <= 40 %}
          softener_40
        {% elif states('sensor.clack_procent')|float > 10 and states('sensor.clack_procent')|float <= 20 %}
          softener_20
        {% elif states('sensor.clack_procent')|float > 5 and states('sensor.clack_procent')|float <= 10 %}
          softener_10
        {% elif states('sensor.clack_procent')|float > 0 and states('sensor.clack_procent')|float <= 5 %}
          softener_0
        {% else %}
          off
        {% endif %}

fonske avatar Nov 04 '22 12:11 fonske

I'm also having the same issue.

JRSHENK avatar Nov 04 '22 15:11 JRSHENK

Yep, same

Skevdude avatar Nov 04 '22 16:11 Skevdude

I got a different problem with Picture Elements card after installing 2022.11 - there is a fat gray horizontal line across the entire image destroying the visual experience of it

magune avatar Nov 05 '22 06:11 magune

F44FEFC3-1327-4533-95A6-3F0843C42F90

magune avatar Nov 05 '22 06:11 magune

My problem is a different issue, i have filed a separate bug report in frontens channel. For some reason i cant delete my comments here

magune avatar Nov 05 '22 06:11 magune

Probably same: https://github.com/home-assistant/frontend/issues/14284 https://github.com/home-assistant/frontend/issues/14297

ildar170975 avatar Nov 06 '22 01:11 ildar170975

I'm having the same issue

sgreenstein1970 avatar Nov 07 '22 12:11 sgreenstein1970

Same here!

kanterus avatar Nov 08 '22 18:11 kanterus

Same issue here

luccoenegracht avatar Nov 09 '22 10:11 luccoenegracht

Using the same Clack 'card' so the same issue occurs here

JHurk avatar Nov 09 '22 10:11 JHurk

Yea I'm having the same issue

jglassonnz avatar Nov 10 '22 09:11 jglassonnz

Are there any updates from the makers of home assistant to fix this issue?

fonske avatar Dec 18 '22 13:12 fonske

This issue seems fixed in (at least) version 2023.2.2 of HA Core, can anyone else check/confirm? Am updating to 2023.2.3 now, if this one breaks it again I will report back. But assume this release will not break it.

JHurk avatar Feb 08 '23 09:02 JHurk

I was able to make it work back on 2022.11 by also including a width property, as shown below. This has continued to work for me with every upgrade since.

style: left: 10.3% top: 33% width: 16% type: image image: /local/image_file_name.png type: picture-elements

On Wednesday, February 8, 2023 at 04:03:26 AM EST, JHurk ***@***.***> wrote:  

This issue seems fixed in (at least) version 2023.2.2 of HA Core, can anyone else check/confirm? Am updating to 2023.2.3 now, if this one breaks it again I will report back. But assume this release will not break it.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

JRSHENK avatar Feb 08 '23 12:02 JRSHENK

For me the problem is also solved since one of the recent versions of this year

fonske avatar Feb 08 '23 16:02 fonske