Calculate a nas disc usage percentage with total and used value

i want to create a disc fullness percentage sensor from the total disc capacity and the used capacity value
how do i do this?


this are the sensor attribute i can use

solved with a template sensor with this value template:

value_template: {{ ((state_attr('sensor.shiroe_tower_disk_1', 'fsused')|int) / (state_attr('sensor.shiroe_tower_disk_1', 'fssize')|int) *100)|round(1) }}