Mark a sensor that has not updated in a while

I had a look around, but was not able to find anything.

Some of my sensors, sometimes fail (expected network issues due to long range mainly), some will fail for sure in the future (battery powered).

Is there something that can mark sensors, that have not updated in a while? For example mark them in a different colour or similar?

Hello morukzy

I literally put your title into a search and came up with results…
Put this into a search engine:

site:community.home-assistant.io Mark a sensor that has not updated in a while

How to help us help you - or How to ask a good question.

Thank you. Those results were along the lines that I had found previously

I could not see anything that allows me to change the font colour or highlighting the text in the dashboard though. (Looked in the documentation as well)

If you wish for a Dashboard solution then look at auto-entities.

I have a veiw on my system dashboard that has two columns for Automations, “Running Automations” and “Idle Automations”. See below for full example.

Your auto-entities for states unavailable or unknown would start with…

type: custom:auto-entities
card:
  type: entities
filter:
  include:
    - options: {}
      state: unavailable
    - options: {}
      state: unknown
  exclude: []

Yaml Code for my Idle Automations (running is same except for tite and current: 1. I use options: to use the entities row as custom:multiple-entities-row which would allow you to do most variants of display including color, though for me I am including last_triggered as a debug info for if an automation has not run when expected.

Automation Example

type: custom:layout-card
layout_type: custom:horizontal-layout
cards:
  - type: custom:auto-entities
    filter:
      include:
        - domain: automation
          attributes:
            current: 0
          options:
            type: custom:multiple-entity-row
            attribute: last_triggered
            format: relative
            state_color: false
    sort:
      method: last_triggered
      reverse: true
    card:
      type: entities
      title: Idle Automations
      show_header_toggle: false