button-card
button-card copied to clipboard
helpers.relativeTime(date) doesn't work
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
Expected behavior No error ;)
Desktop (please complete the following information):
- Browser chrome
- Version 125.0.6422.78