Please format your code correctly by surrounding it with three backticks:
```
YOUR CODE HERE
```
With the code you’ve pasted, we cannot see any indentation errors (important in YAML) and the forum substitutes “smart quotes” for the real ones.
It looks as though you have two excess close-parentheses ))
at the end of your template; and the unit should be kW
with a lower-case k
.
You can create template sensors in the UI now (so no need for YAML), under Helpers:
State template:
{{ states('sensor.electricity_meter_energieverbruik_tarief_1') | float(0)
+ states('sensor.electricity_meter_energieverbruik_tarief_2') | float(0) }}