Global entity picture change based on state

Hello all,

I am new to Home Assistant and my HA setup is slowly taking shape. I am enjoying the learning and tinkering so far and am now stuck with a couple of problems I would like some help with.

  1. Is it possible to change the entity picture for the light domain globally based on state. I was able to change the picture to on or off picture using the below but how can I make it state based? I think templates could be the answer here but I don’t fully understand how to.
  customize_glob:
    "light.floodlights*":
        entity_picture: /local/floodlight_off.png
    "light.light*":
        entity_picture: /local/light_off.png
  1. In the same vein, how do I change the entity picture for a single entity bases on attributes. For example, I want my DHW state to show different entity picture based on available water temperature.

  2. How do I change the person entity picture based on state. I would like to use different pictures based on home or away state.

I have searched the forums for solutions and it looks like Custom-UI could be the answer but I would like to know if the same results can be achieved using the native install.

Thank you for your time.

Nimal