marcokreeft87 / room-card

Show multiple entity states, attributes and icons in a single card in Home Assistant's Lovelace UI
MIT License
226 stars 38 forks source link

An info_entity with entity_picture_template does not display in v1.08.04 #341

Closed kevinhorsey closed 1 month ago

kevinhorsey commented 2 months ago

Which version of Room Card? 1.08.04

Describe the bug An info_entity with an entity_picture_template does not display in V1.08.04. This displayed correctly until I upgraded room-card from V1.07.25 to 1.08.04

To Reproduce With room-card 1.07.25 the entity_picture of an info_entity is displayed correctly Upgrade from room-card 1.07.25 to 1.08.04 The entity_picture of the info_entity is not displayed (just a blank space where it should be)

Expected behavior The entity_picture should be displayed

Screenshots The top view is with room-card 1.07.25 and the bottom view is 1.08.04.

weather

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context svg files are correctly stored in www/custom_icons

YAML configuration.yaml

  sh_weather_title:
    value_template: >
      {{' '}} Weather
  sh_weather_now:
    value_template: "{{ states('weather.snowshill') }}"
    entity_picture_template: >
      {% if states('weather.snowshill') == 'cloudy' %} '/local/custom_icons/s-cloudy.svg'
        {% elif states('weather.snowshill') == 'rainy' %} '/local/custom_icons/s-rainy-1.svg'
        {% elif states('weather.snowshill') == 'clear-night' %} '/local/custom_icons/s-clear-night.svg'
        {% elif states('weather.snowshill') == 'fog' %} '/local/custom_icons/s-fog.svg'
        {% elif states('weather.snowshill') == 'hail' %} '/local/custom_icons/s-hail.svg'
        {% elif states('weather.snowshill') == 'lightning' %} '/local/custom_icons/s-scattered

thunderstorms.svg' {% elif states('weather.snowshill') == 'lightning-rainy' %} '/local/custom_icons/s-thunderstorms.svg' {% elif states('weather.snowshill') == 'partlycloudy' %} '/local/custom_icons/s-cloudy-2-day.svg' {% elif states('weather.snowshill') == 'pouring' %} '/local/custom_icons/s-rainy-3.svg' {% elif states('weather.snowshill') == 'snowy' %} '/local/custom_icons/s-snowy-3.svg' {% elif states('weather.snowshill') == 'snowy-rainy' %} '/local/custom_icons/s-snow-and-sleet-mix.svg' {% elif states('weather.snowshill') == 'sunny' %} '/local/custom_icons/s-clear-day.svg' {% elif states('weather.snowshill') == 'windy' %} '/local/custom_icons/s-wind.svg' {% elif states('weather.snowshill') == 'windy-variant' %} '/local/custom_icons/s-wind.svg' {% elif states('weather.snowshill') == 'exceptional' %} '/local/custom_icons/s-unknown.svg' {% endif %}

dashboard.yaml

  - type: custom:room-card
    info_entities:
      - entity: sensor.sh_weather_title
        styles:
          font-size: 25px
          justify: left
      - entity: sensor.sh_weather_now
        show_icon: true
        styles:
          padding-top: 10px
          padding-right: 5px
      - entity: sensor.sh_temperature_now
        styles:
          font-size: 14px
marcokreeft87 commented 2 months ago

You need to use the attribute config for this