Grid Consumption Cost - do not have the expected units of measurement ''{currency}/kWh'' or ''{currency}/Wh'':"

I’ve recently started to integrate the Power/Energy consumption from the recent updates, however, my Electricity cost in the UK is based on two prices.
The first price if for the first 2kWh is used, then the second price there after.

I’ve created some ‘Helpers’ to track the costs of each rate, plus how much kWh before it switches tarrif.
image

I’ve then created a template sensor that checks if the daily consumption is over 2kWh, then it’ll change the price to Tariff2.

image

- platform: template
  sensors:
    utilita_electric_actual_daily_cost:
       friendly_name: "Utilita Elec Daily Cost"
       unit_of_measurement: 'kWh'
       icon_template: mdi:flash
       value_template: >-
               {% if states('sensor.daily_consumption') | float > states('input_text.utilitatariff_dailykwh') | float %}
                {{ states("input_text.utilitatariffrate2") | round(3) }}
                {% else %}
                {{ states("input_text.utilitatariffrate1") | round(3) }}
                {%- endif %}

I’ve tried this with the “unit_of_measurement” as £ and kWh but I still get this error…
image

unit_of_measurement: '£/kWh'

1 Like

That did the trick!
(I should have read the error!)

1 Like