Energy: kW to W

I’ve read a few threads about this but haven’t found a solution yet. I want to convert data from kW to W.

/config/configuration.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

automation: !include automations.yaml

sensor: !include sensors.yaml

/config/sensors.yaml

#######energie verbruik in Watt############################
- platform: template
  sensors:
    dsmr_in_watts:
      friendly_name: "Current Power Usage"
      unit_of_measurement: "W"
      value_template: "{{ states('sensor.power_consumption')|float * 1000 }}"

image

type: gauge
entity: sensor.power_consumption
min: 1
max: 5
needle: true
severity:
  green: 3
  yellow: 2
  red: 1

Use your template sensor in the gauge?

type: gauge
entity: sensor.dsmr_in_watts
min: 1
max: 5000
needle: true
severity:
  green: 3000
  yellow: 2000
  red: 1000
1 Like

Sometimes it can be so simple … :crazy_face: