Modify Utility meter after initial set up

Trying to set things up to keep track of my Octopus Go tariff. Nearly there but I selected the wrong sensor for grid import when I first set up the helper.

You can see the daily meter is showing ;power (kW) not energy (kWh)
power not energy

I found the yaml controlling the set up in core.config_entries

{
        "entry_id": "c522d0df1064fda566e83f0cb9f606fb",
        "version": 1,
        "domain": "utility_meter",
        "title": "Octopus Go Daily",
        "data": {},
        "options": {
          "name": "Octopus Go Daily",
          "source": "sensor.kyrles_cross_solar_imported_energy",
          "cycle": "daily",
          "offset": 0.0,
          "tariffs": [
            "Peak rate",
            "Cheap rate"
          ],
          "net_consumption": false,
          "delta_values": false
        },
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": null,
        "disabled_by": null
      }

and changed the source to be the correct sensor…

Restarted but card still shows kW not kWh and states display in Developer tools shows the wrong units but the correct source.

OK I fixed it changing the unit of measurement in Set State up at the top of the Developer States screen for the two entities - peak and cheap rate. The screen shows some YAML but where is it - it’s not in core.config_entries, the yaml there is unchanged?

Please can someone explain what is going on?

  • How best to modify utility meter after first config?
  • Where is unit of measurement stored?
  • Why is it in a different place to the rest of the meter config?

Once again I freely admit I’m poking around without much knowledge but it would be nice to understand some principles to guide me.

Thanks

3 Likes

Thanks for that location.

I needed to change the source for a Utility Meter configured in the UI and that file was the one. It worked for me.

I think the lesson for me is to create the Helper in the Config file - at least you can edit it later if needed. They should fix that.

2 Likes

Thanks guys, it is still an unchanged situation.
I try to add a gas helper to the energy dash Gas Consumption.

It gets selectable when I temporary add device_class: gas
& unit_of_measurement: m³ to the state attributes at the Developer - States tab.
But indeed, adding it to the helper entry in the core.config_entries doesn’t make a difference and we still have to use the config yaml template ā€˜trick’…

I’m confused. Are you saying that you cannot edit a utility meter once it is set up via the UI? Because I don’t see that option.

So I guess the only way to edit all fields is to delete & recreate?

Now I’m even more confused. My utility meter was showing an exclamation mark and I couldn’t edit it. I had fixed the input sensor, so I didn’t understand what the issue was.

I tried to reset it using the service, but it wouldn’t show up as a relevant entity.
There was also no way to delete the meter from the UI!

Eventually, I set the ā€œsensor always availableā€ and suddenly it has data, I can edit all the options and even delete it.

Very confused, no idea what’s going on. (But everything is working for me again.)