My Goal is to convert and entity attribute output from GiB to TB
The entity attribute state returns 10940.1 GiB
I understand this is most likely a string so I’ve split it and isolated just the number with
{{ states.sensor.pinewood_volume_used_qnap.attributes['Volume Size'].split(" ")[0] }}
which outputs 10940.1
But when I add the round() function to my formula below it returns 0. Otherwise if I remove the round() function it works but it returns 11.746735554559999
and I’m trying to convert this to a whole number. This is what I’ve got so far:
{{ states.sensor.pinewood_volume_used_qnap.attributes['Volume Size'].split(" ")[0] | int *0.001073741824 | round() }}
It’s probably something simple…any help is appreciated.