Cant configure utitlity_meter in any YAML file?

Hi all

I have an annoying problem with the Utility Meter integration. I can configure a Utility Meter sensor through the UI, no problem there and it show up as it should. However when I try to configure one in a config-file, no such luck. I write ex:

utility_meter:
  energy_hourly:
    source: sensor.absolute_energy
    cycle: hourly
    name: "kWh"

I restart but nothing shows up as a sensor even if waiting several hours, and nothing shows up in the log-file related to utility_meter. Anybody got a clue? This is a new sensor, not used anywhere else.

I mean the yaml looks right in isolation but how is this yaml included in your configuration.yaml? Is this in there just like that or do you have it in another file which is included via one of the !include directives?

What is the config for that input sensor?

Thanks for answering. I have tried both things: !include directive, insert in configuration.yaml both in bottom in the beginning and in the top, just to exclude any other quirks that may have in the config file.

The input is a template sensor:

      - name: "Absolute energy"
        state: "{{ states('sensor.total_energy') | float + states('input_number.initial_energy') | float }}"
        unit_of_measurement: "kWh"

The sensor total_energy is a pulsecounter thru MQTT on my power-meter. I would like to add an offtset and thus a template.