[solved] Device class for car fuel prices scrape sensor?

I pulling the fuel prices in with the scrape integration.
The value is OK but I get a warning in the logs about the incorrect state class.
I have used Gas as a device class since I thought this is the translation for fuel and added the currency per liter.

Is there another/a better way or do I just have to live with it?

You would use “monetary” since they’re prices. Here is the list of device classes for a sensor.

Hi Michael, thanks for that list but monetary is not available in my config… :thinking:
Also, the fuel-prices are in price per volume so just the currency would not suffice.

Don’t set a device class. You should set state_class to measurement and then set your unit of measurement to €/L or whatever units you use.

The gas device class would be for natural gas or propane used for home heating.

2 Likes

Thanks Rick, you solved it! :bowing_man: