So I’ve got a sensor sending energy information through modbus to my ha instance (2021.9.5) and then I use a sensor template to fix it into correct decimal form… But how would I go about exposing sensor.test as a energy device available for use with the new Energy feature? The below is what I have at the moment. The sensor displays the value but is not detected by the energy feature…
It must be an energy sensor.
It must have a unit of kWh or Wh.
It must have an attribute state_class: total_increasing. You can use Customize to add this.
Invalid config for [sensor.template]: [state_class] is an invalid option for [sensor.template]. Check: sensor.template->sensors->test_sensor->state_class. (See ?, line ?).