home-assistant / frontend

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

Pictute Elements, not showing state_image #14284

Closed DravenSA closed 1 year ago

DravenSA commented 2 years ago

Checklist

Describe the issue you are experiencing

Love the look, but unfortunately Picture Elements have stopped working with IMAGES EXAMPLE below an extract from https://www.home-assistant.io/dashboards/picture-elements/#image-element

type: picture-elements
image: /local/floorplan.png
elements:
  # state_image & state_filter - toggle on click
  - type: image
    entity: light.living_room
    tap_action:
      action: toggle
    image: /local/living_room.png
    state_image:
      "off": /local/living_room_off.png
    filter: saturate(.8)
    state_filter:
      "on": brightness(120%) saturate(1.2)
    style:
      top: 25%
      left: 75%
      width: 15%

My simple one was

type: picture-elements
image: /local/irrigation/mon-sun1.png
elements:
  - type: image
    entity: input_boolean.water_monday
    tap_action:
      action: toggle
    state_image:
      'off': /local/off.png
      'on': /local/on/png

Worked like a charm before update, 2022.11, even updated to 2022.11.1 still not working

But then again the Picture Elements stopped pushing aspect ratio a long time ago too, so now it CROPS instead of CONSTRAINT the image to FIT the aspect Ratio.

Would love both to be fixed, but at least the First one is a little more important

Describe the behavior you expected

State_image pics to show

Steps to reproduce the issue

1.Updated to 2022.11.0 2.then updated to 2022.11.1 3. ...

What version of Home Assistant Core has the issue?

2022.11.0 and 2022.11.1

What was the last working version of Home Assistant Core?

2022.10. whatever the last one was

In which browser are you experiencing the issue with?

All of them

Which operating system are you using to run this browser?

Windows 10

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

blair287 commented 2 years ago

Same issue no images weirdly some are still working others not

HypeLaser commented 2 years ago

I have the same issue. I could correct the problem for browsers by adding "width: 100%" to the Style section of the code. But this does NOT solve the issue for the iOS App.

ildar170975 commented 2 years ago

Confirm. All images are not displayed with a default theme.

ildar170975 commented 1 year ago

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

otistarda commented 1 year ago

Same problem after updating, hopefully they will solve it soon or my floorplan is useless.

github-actions[bot] commented 1 year ago

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.

DravenSA commented 1 year ago

This problem has not been resolved as of Home Assistant 2023.2.3 Supervisor 2023.01.1 Operating System 9.5 Frontend 20230202.0 - latest

raoulteeuwen commented 1 year ago

Still also have a problem with this, adding width does not solve it for me.

github-actions[bot] commented 1 year ago

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.

DravenSA commented 1 year ago

This problem has not been resolved as of Home Assistant 2023.6.3 Supervisor 2023.06.2 Operating System 10.3 Frontend 20230608.0 - latest

and if none of the developers are looking at this, will it ever be fixed?

ildar170975 commented 1 year ago

Could you repeat again what do you see now and what do you expect? Also, please attach a proper code; there are 2 snippets in the 1st post, and the 2nd snippet does not have style specified. That is why I wonder which code does not work as expected.

github-actions[bot] commented 1 year ago

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.