wayne-love / ESPySpa

MIT License
10 stars 7 forks source link

Incorrect entity config #58

Open wayne-love opened 1 week ago

wayne-love commented 1 week ago

2024-11-09 15:11:26.167 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.myspa_total_energy (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

lucasnz commented 5 days ago

Is it just a matter of changing:

  ADConf.displayName = "Total Energy";
  ADConf.valueTemplate = "{{ value_json.power.totalenergy }}";
  ADConf.propertyId = "TotalEnergy";
  ADConf.deviceClass = "energy";
  ADConf.entityCategory = "diagnostic";

to:

  ADConf.displayName = "Total Energy";
  ADConf.valueTemplate = "{{ value_json.power.totalenergy }}";
  ADConf.propertyId = "TotalEnergy";
  ADConf.deviceClass = "total";
  ADConf.entityCategory = "diagnostic";