How to change 'Show as' option from 'Running' to 'Online'

Hey everyone!
I am trying to implement the SWAKES dashboard into my Home Assistant, and I’m stuck at the part at the Network Status card.

entities:
  - entity: binary_sensor.zigbee2mqtt_running
    name: Zigbee
    show_entity_picture: true
  - entity: binary_sensor.mosquitto_broker_running
    name: MQTT
    show_entity_picture: true
  - entity: binary_sensor.cloudflared_running
    show_entity_picture: true
    name: Cloudflare
  - entity: binary_sensor.home_assistant_google_drive_backup_running
    name: Google Drive
    show_entity_picture: true
style: |
  ha-card {
    text-align: center;
    
        }    
title: false
type: glance

^ This is the code I’m using right now in the dashboard.

binary_sensor.zigbee2mqtt_running:
  entity_picture: /local/Logos/zigbee_system.png

binary_sensor.mosquitto_broker_running:
  entity_picture: /local/Logos/mqtt.png

binary_sensor.cloudflared_running:
  entity_picture: /local/Logos/cloudflare_icon.png

binary_sensor.home_assistant_google_drive_backup_running:
  entity_picture: /local/Logos/googledrive.jpg

The code for the entity pictures ^

My dashboard:
image

SWAKES with the ‘Online’ instead of ‘Running’:
image

The code that SWAKES used:

              - entities:
                  - entity: sensor.deconz_online
                    name: Zigbee
                  - entity: sensor.sonoff_rf_bridge_online
                    name: 433Mhz RF
                  - entity: sensor.esphome_online
                    name: ESPHome
                  - entity: sensor.unifi_online
                    name: WiFi
                style: |
                  ha-card {
                    text-align: center;
                    
                        }    
                title: false
                type: glance

Thank you for helping me!

Binary sensors have a front-facing state description based on their device class, you can change the device class of an entity using customization to get a more appropriate state description. However, “Online/Offline” is not one of the available options. As you can see in the screen shot you posted the SWAKES card is based on Sensors which can have a much broader range of states. If it’s really important, you can create template sensors based on you binary sensors with the state outputs you prefer.

Can you help me with a correct template based on my binary? I have tried something but it gives me an output of ‘Unavailable’ instead of what I wanted which is ‘Online’ / ‘Offline’

template:
  - sensor:
      - name: Zigbee Online
        state: >
          {{ iif(is_state('binary_sensor.zigbee2mqtt_running', 'on'), 'Online', 'Offline') }}
        availability: >
          {{ states('binary_sensor.zigbee2mqtt_running') not in ['unavailable', 'unknown'] }}
      - name: MQTT Online
        state: >
          {{ iif(is_state('binary_sensor.mosquitto_broker_running', 'on'), 'Online', 'Offline') }}
        availability: >
          {{ states('binary_sensor.mosquitto_broker_running') not in ['unavailable', 'unknown'] }}
      - name: Cloudflare Online
        state: >
          {{ iif(is_state('binary_sensor.cloudflared_running', 'on'), 'Online', 'Offline') }}
        availability: >
          {{ states('binary_sensor.cloudflared_running') not in ['unavailable', 'unknown'] }}
      - name: Google Drive Online
        state: >
          {{ iif(is_state('binary_sensor.home_assistant_google_drive_backup_running', 'on'), 'Online', 'Offline') }}
        availability: >
          {{ states('binary_sensor.home_assistant_google_drive_backup_running') not in ['unavailable', 'unknown'] }}
1 Like

image
Hi, thanks for trying to help me!
I have added your code and restarted the whole HA, still showing up as Running

Did you update the entities in the card?

1 Like

Silly me,
image
Work as a charm, god bless you, Drew!

1 Like