Custom message for "Entity not found" in Lovelace

Hi!

There is any way to make a custom message for a not existing/working entity in lovelace? I have some entities which are not working all day and I want to show a custom message in lovelace instead of that yellow mark with “Entity not available”. Can someone knows how to do that?

Thank you!

I found a way, if somebody need to know how to do this:

Just create a custom sensor, for example:

    pickone2_nvidia_geforce_gtx_1060_6gb_temperatures_gpu_core_custom:
      value_template: >
        {% if states.sensor.pickone2_nvidia_geforce_gtx_1060_6gb_temperatures_gpu_core.state is defined %}
        {{ states.sensor.pickone2_nvidia_geforce_gtx_1060_6gb_temperatures_gpu_core.state + " °C"}}
        {% else %}
        unavailable
        {% endif %}
      icon_template: "mdi:thermometer"

In this way, if the entity is added to Lovelace and it will not be available “Entity not found”, the sensor will show as Unavailable, not like in an usual way, an “error” with yellow message…

Good luck!