Adding images to a Template Sensor

I did, but not sure what I’m looking for?

It still lists the correct clothing combo, but no image.

Do you have this png in /www/josie folder?
Also, the created entity ends with “_2” - are you sure that you use same entity inside a Picture-entity card? And it is definitely not “sensor.josie_pjs”.

The images are here:

And I have the Unique ID as: unique_id: sensor.josie_pjs but for some reason that doesn’t show up?

The only sensor I can see that shows any info on the clothing is:

sensor.what_should_josie_wear_to_bed_2

That is the one that lists the clothing on my dashboard, I currently see:

image

This is the sensor information that is currently showing in the Developer Tools:

Now add this sensor to the picture-entity card. What you posted above is Entity card.

I get this:

image

As I said, cannot test myself.
Try adding this entity to Entities card - will you see an image then? (instead of icon)
Or just open more-info for this entity.

Also , just in case, remove everything from “picture: …” and set some image with a short name like “/local/josie/orange.jpg” (ofc this file should exist).

I altered the sensor back to this:

template:
  - sensor:
      - name: "What Should Josie Wear to Bed?"
        icon: mdi:tshirt-crew
        state: >-
          {% set temp = states('sensor.bedroom_temperature_sensor_temperature') | float %}
          {% if temp <= 16 %}
            2 tog bag, Sleep suit, Long sleeve, Socks, Mittens, Hat
          {% elif temp <= 17 %}
            2 tog bag, Sleep suit, Long sleeve, Socks
          {% elif temp <= 19 %}
            1 tog bag, Sleep suit, Long sleeve
          {% elif temp <= 21 %}
            1 tog bag, Sleep suit, Short sleeve
          {% elif temp <= 23 %}
            0.5 tog bag, Sleep suit
          {% elif temp <= 25 %}
            0.5 tog bag, Short sleeve    
          {% else %}
            Short sleeve
          {% endif %}
        availability: "{{ 'sensor.bedroom_temperature_sensor_temperature' | has_value }}"

And then set the Picture Entitiy code to:

show_state: false
show_name: false
camera_view: auto
type: picture-entity
entity: sensor.what_should_josie_wear_to_bed
state_image:
  2 tog bag, Sleep suit, Long sleeve, Socks, Mittens, Hat: /local/josie/2-tog-bag,-Sleep-suit,-Long-sleeve,-Socks,-Mittens,-Hat.png
  2 tog bag, Sleep suit, Long sleeve, Socks: /local/josie/2-tog-bag,-Sleep-suit,-Long-sleeve,-Socks.png
  1 tog bag, Sleep suit, Long sleeve: /local/josie/1-tog-bag,-Sleep-suit,-Long-sleeve.png
  1 tog bag, Sleep suit, Short sleeve: /local/josie/1-tog-bag,-Sleep-suit,-Short-sleeve.png
  0.5 tog bag, Sleep suit: /local/josie/0.5-tog-bag,-Sleep-suit.png
  0.5 tog bag, Short sleeve: /local/josie/0.5-tog-bag,-Short-sleeve.png
  Short sleeve: /local/josie/Short-sleeve1.png

And now finally, the pictures are displaying correctly:

image

Thanks for your help with this, we got there in the end!