Hello there
I am using an Tasmota device to read my utility meter. The device is called “gplugm”. The sensor is called “sensor.gplugm_ei”, which shows the total energy consumed this year. This is working perfectly. The value is showing up in my dashboard, but without any unit of measurement.
I need to configure the sensor as Energy sensor and set a unit of measurement “kWh” to properly use the energy dashboard.
I received this configuration script from the developer of the device
homeassistant:
customize_glob:
sensor.gplugm_ei:
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
I added it to the top of my configuration.yaml but I get a bad error:
Cannot quick reload all YAML configurations because the configuration is not valid: Invalid config for 'homeassistant' at configuration.yaml, line 2: expected a dictionary for dictionary value 'customize_glob', got None Invalid config for 'homeassistant' at configuration.yaml, line 3: 'sensor.gplugm_ei' is an invalid option for 'homeassistant', check: sensor.gplugm_ei Invalid config for 'homeassistant' at configuration.yaml, line 4: 'unit_of_measurement' is an invalid option for 'homeassistant', check: unit_of_measurement Invalid config for 'homeassistant' at configuration.yaml, line 5: 'device_class' is an invalid option for 'homeassistant', check: device_class Invalid config for 'homeassistant' at configuration.yaml, line 6: 'state_class' is an invalid option for 'homeassistant', check: state_class
What am I doing wrong? Could somebody help me with an example on how to set up the sensor in Configuration.yaml?