HI everyone,
I am struggling with the following epsilon error and cannot find a work around…I wonder if you can help
I am creating the following custom button card showing few info for my NAS.
As you can see the free space % comes out with the epsilon error…
here the code I am using for that specific field:
custom_fields:
vol: |
[[[
var free_disk = 100 - states['sensor.torakiki_volume_used'].state;
return `<ha-icon
icon="mdi:server"
style="width: 12px; height: 12px; color: deepskyblue;">
</ha-icon><span>Space left: <span style="color: var(--text-color-sensor);"><b>${free_disk}%</b></span></span>`
]]]
I have tried using float and rounding, but if I do so, the card is simply not showing anymore.
Any suggestion?
Thanks a lot