Summary report shows current status of fuel level

michal2 years ago

Hi

I can see correct values for Fuel spent in report Trips per each trip, but Summary report for day is showing current value of Fuel level in tank:

Start Date	Distance	Average Speed	Spent Fuel	Odometer End	Odometer Start
2023-02-16	66.82 km	45.94 km/h	-69.00 l	197559.65 km	197492.83 km

is there a way how to show spent fuel for current day? It shows even negative number as you can see

thanks
Michal

Anton Tananaev2 years ago

It shows the difference in fuel level for the time period.

michal2 years ago

I was assuming it should show spent fuel for the current day, that means calculate each trip and show it in Summary

michal2 years ago

I think I found the reason, this device is sending fuel in 2 attributes: fuel and io84.
io84 is sent always with the current level of fuel, is there any way how to show io84 value in report instead Fuel? so the fuel will be calculated from io84. I updated config copy attribute with io84 and test shows correct value, I have updated device on page and assigned it

Anton Tananaev2 years ago

You can use computed attributes for it.

michal2 years ago

I did it in this way:

Description	Attribute	Expression	Type	
Fuel	io84	io84 ? io84 : 0	number

and assigned Fuel attribute to device

is this enough? or other configuration must be done

Anton Tananaev2 years ago

If you want it to replace fuel, you have to select fuel as the attribute.