Uptime Card configuration

Hello Everyone,

Can someone help me out with the Uptime Card config ?

I have installed it from HACS as it was mentioned in the description,
Also i have took an example configuration . see below:

type: 'custom:uptime-card'
entity: binary_sensor.ping_google
# Home Assistant ping integration - https://www.home-assistant.io/integrations/ping
title_template: 'https://www.google.com/'
icon: 'mdi:heart'
title_adaptive_color: true
average_template: '[[[ return variables.uptime.toFixed(2); ]]]% uptime'
bar:
  height: 46
  round: 0
  spacing: 10
  amount: 6
show:
  status: false
  icon: false
tap_action:
  action: url
  url_path: 'https://www.google.com/'
alignment:
  status: spaced
  header: center
duration:
  quantity: 3
  unit: day

And i personalized it , see below.

type: custom:uptime-card
entity: binary_sensor.ping_google
title_template: storage4me.eu
icon: mdi:heart
title_adaptive_color: true
average_template: '[[[ return variables.uptime.toFixed(2); ]]]% uptime'
bar:
  height: 40
  round: 5
  spacing: 7
  amount: 28
show:
  status: false
  icon: false
tap_action:
  action: url
  url_path: https://storage4me.eu
alignment:
  status: spaced
  header: center
duration:
  quantity: 7
  unit: day

And it 's not working , i believe i missed some basic config , like

Add the resource reference inside your configuration.yaml with URL /local/uptime-card.js and type module

Honestly i have no idea how to reference it.

This is how it looks β†’ Nextcloud

Thank you,

the code you provided works for me. have you added a host from the ping integration and used that as the entity?

Hello Frosty,

That was the issue , it’s working now.

Thank you very much.

1 Like