Picture Glance Card: how to change color of entities according to their state?

Hi
I have a Picture Glance Card that is showing a camera feed from an ESP32cam
The card also shows the state of a motion sensor, WIFI, a light and a temp sensor
PictureGlanceWithEntities
I want to achieve the following:

  • change color of the light bulb when it is “on”
  • show the current value of the temperature sensor in stead of the thermometer icon
  • show the current value of the wifi sensor (signal strength) in stead of the WIFI icon

I could not find in the documentation how to do that, but I know smart people use magical things (like jina2) to make enhance the capabilities of HomeAssistant, so I decided to post a question here.

Could anyone please provide a tip on how to make this happen? (jinja2 was just an example)
Here is my code:

type: picture-glance
title: westCam2
entities:
  - entity: light.westcam2_light
  - entity: binary_sensor.westcam2_pir
  - entity: sensor.westcam2_wifi_signal
  - entity: sensor.westcam2_temp_cpu
  - entity: switch.westcam2_fan
camera_image: camera.westcam2
entity: light.westcam2_light
camera_view: live
hold_action:
  action: toggle

Thank you so much,
chrisV

Hi
Meanwhile I found how to display the values of the sensors in the Picture Glance Card
This can be done by simply adding show_state: true

This was (of course) mentioned in the documentation, but I had overlooked it.
Something a bit weird: this option cannot be configured through the Visual Editor

PictureGlanceCardShowingState2

Here is the updated YAML for the picture-glance card:

type: picture-glance
title: westCam2
entities:
  - entity: switch.westcam2_fan
    icon: mdi:fan
  - entity: light.westcam2_light
    icon: mdi:outdoor-lamp
  - entity: binary_sensor.westcam2_pir
  - entity: sensor.westcam2_wifi_signal
  - entity: sensor.westcam2_temp_cpu_2
  - entity: sensor.westcam2_temp_outdoor
camera_image: camera.westcam2
camera_view: live
hold_action:
  action: toggle
tap_action:
  action: more-info
show_state: true

Background:
the cam is an ESP32cam
with a Dallas 18b20 temperature sensor added to it
and a FAN controlled by GPIO (buffered by a FET)

Regarding the icon color:
I tried to use a template-sensor to change the icon of e.g. the fan, based on its state.
This had an unexpected side-effect: the entity in the picture glance card then becomes a sensor and is no longer a switch This means it no longer be controlled by pressing/clicking it.

Any tips on how to change the color of the icons in the picture glance card, based on its state, are still greatly appreciated.

Thank you so much,
chrisV