Calculate a device's theoretical power comsumption by the time it's on

I got It to work! :smiley:

For the fake power meter I use:

  - platform: template
    sensors:

       bedroom_heater_power:
        friendly_name: "Bedroom Heater Power"
        unit_of_measurement: 'kW'
        value_template: >
          {% if is_state('switch.your_power_plug', 'on') %}
              1.50 # <- replace with the kW of your device
          {% else %}
              0
          {% endif %}

And this for the integration sensor:

  - platform: integration
    source: sensor.bedroom_heater_power
    name: Bedroom Heater Power Consumption
    round: 2

Thanks for the solution @nickrout !

3 Likes