home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.04k stars 2.76k forks source link

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

Closed fonske closed 1 year ago

fonske commented 1 year ago

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 %}
JRSHENK commented 1 year ago

I'm also having the same issue.

Skevdude commented 1 year ago

Yep, same

magune commented 1 year ago

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 commented 1 year ago

F44FEFC3-1327-4533-95A6-3F0843C42F90

magune commented 1 year ago

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

ildar170975 commented 1 year ago

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

sgreenstein1970 commented 1 year ago

I'm having the same issue

kanterus commented 1 year ago

Same here!

luccoenegracht commented 1 year ago

Same issue here

JHurk commented 1 year ago

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

jglassonnz commented 1 year ago

Yea I'm having the same issue

fonske commented 1 year ago

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

JHurk commented 1 year ago

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.

JRSHENK commented 1 year ago

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: @.***>

fonske commented 1 year ago

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