How to create derivative sensor from attribute?

I am getting battery level as part of mqtt location sensor. Can someone advise me how can I use that batt attribute in configuration.yaml to create derivative sensor, so I see speed of discharging?

The mqtt message with attribute is

Thanks very much, Jan