Help needed Template sensor unknow error

im trying to create a sensor for my upc thats multiplys my nominal wattage and my used wattage so taht i dont have to do math every time i check my upc state

{{(states(‘sensor.apc_back_ups_last’)| float(0) * (states(‘sensor.apc_back_ups_nominale_wirkleistung’) | float(0))*10) | round(0) }}
but it gives me a unknow error

Correct your quotes.

Nothing wrong with the quotes in the screenshot. OP: please format code correctly for the forum with the </> button.

I think the problem is the combination of W as the unit and Energie as the device class. Should be power (Leistung).

If that doesn’t fix it, paste the template into Developer Tools / Template and let us know what it returns.

Then I wonder WTH a dropdown contains all possible UoMs if a particular device_class is selected.
image

now im getting this error in template tester i get the disered output thoug

  1. Where is my microscope? Oh, the picture can be up-scaled.
  2. The error says “unexpected char at 10” - means “unexpected char at position 10”. Check again your template & read my comment above about quotes…

Now they look like backticks — presumably copied back in from the incorrectly-formatted code in the first post.