Creating dummy/virtual power meters


what would be your ideas to create dummy/virtual power meters? I don’t have installed power meters for my lights, but I’m pretty sure that they consume i.e. 10W if they are on.

How would be your thoughts to collect their consumption?

Thanks, Thomas

It is important to select the correct method of integration though. See this post: Power consumed per day

Oh! That means my setup is wrong with just:

        entity_id: sensor.time
        unit_of_measurement: W
        value_template: >
          {% set ns = namespace(states=[]) %}
          {% for s in states.sensor %}
            {% if s.object_id.endswith('_power_consumption') %}
              {% set ns.states = ns.states + [ s.state | float ] %}
            {% endif %}
          {% endfor %}
          {{ ns.states | sum | round(2) }}
    source: sensor.power_consumption_total
    cycle: hourly
    source: sensor.power_consumption_total
    cycle: daily
    source: sensor.power_consumption_total
    cycle: monthly
    source: sensor.power_consumption_total
    cycle: yearly

I need to pass the wattmeter into an into an and then pass it to utilitymeter right?


1 Like

Thanks again for your help. Really appreciated!

1 Like

If you use Node Red, that’s how I do it right now:

Only takes one flow, one mqtt sensor and the utility meter (and two input numbers, if you want to quickly change Wattages)

1 Like