Feature Request: State Text Override for Dashboard Entity Cards

When using device tracker to verify devices are online their states display by default as ‘home’ or ‘away’ in the dashboard. Whilst these terms make sense when tracking people, they don’t for home network devices. Being able to add a line/s in the yaml, or set options to the card configuration, replacing the displayed state text only (not changing the actual state), to something more appropriate such as ‘online’ or ‘offline’ would be most useful.

Possible yaml example>

type: entities
entities:
  - entity: device_tracker.rf_bridge
    name: RF Bridge
    icon: mdi:access-point-network
    secondary_info: last-updated
	state_text_overrides:
		state: Home
		override: Online
		State: Away
		override: Offline
state_color: true

NB: I’m not a big programmer, so please don’t pick apart the above too much. It’s only to clarify my suggestion.

My current card>
Capture

I’m aware there are workaround solutions to achieve this, by creating additional template sensors etc. But these are longwinded approaches, creating unnecessary work and clutter in my opinion.

I believe the additional flexibility provided by this feature would also open opportunities beyond my one example here.

Thanks.

You should be able to ping some of these, rather than using device tracker, in which case the text will be “connected” or “disconnected”.

Don’t forget to vote for your own feature request.

1 Like

Thanks. Will try that.
But I still believe implementing this request would be useful.

EDIT: Have just checked and I already have ping set up for the tracking of these devices.

device_tracker:
  - platform: ping
     hosts:
      alarm_panel: 192.168.1.XXX
      rf_bridge: 192.168.1.XXX
      remoter: 192.168.1.XXX
      power_mon6c: 192.168.1.XXX
      pi_hole: 192.168.1.XXX
      luciferin: 192.168.1.XXX
      bluetooth_gateway: 192.168.1.XXX
      firetab: 192.168.1.XXX
     #count: 5
     scan_interval: 180

Or I see that the other option for pinging all these would require setting up an additional binary sensors for each device. Again, seems unnecessary additional clutter. https://www.home-assistant.io/integrations/ping/

device_tracker entity - may be home, not_home or some zone (for gps-based platforms).
You may use “connectivity” binary_sensor (based on “ping” platform, for instance) - it will be “connected / disconnected”.

But you are saying that you need them “online / offline”.
These are just LABELS.
Use custom template-entity-row card and write everything you want.