button-card icon indicating copy to clipboard operation
button-card copied to clipboard

helpers.relativeTime(date) doesn't work

Open MelleD opened this issue 8 months ago • 0 comments

Checklist

  • [x] I updated the card to the latest version available
  • [x] I cleared the cache of my browser

Describe the bug Error on function helpers.relativeTime(date)

Version of the card Version: 4.1.2

To Reproduce This is the configuration I used:

     - type: custom:button-card
        template: card_title
        label: "test relative time"
        name: >
          [[[
            return helpers.relativeTime(states['sensor.sun_next_dawn'].state)
          ]]]

Screenshots

Bildschirmfoto 2024-05-29 um 15 38 01

Expected behavior No error ;)

Desktop (please complete the following information):

  • Browser chrome
  • Version 125.0.6422.78

MelleD avatar May 29 '24 13:05 MelleD