CircuitSetup / Expandable-6-Channel-ESP32-Energy-Meter

Hardware & Software documentation for the CircuitSetup Expandable 6 Channel ESP32 Energy Meter. Works with ESPHome and Home Assistant.
https://circuitsetup.us/product/expandable-6-channel-esp32-energy-meter/
MIT License
510 stars 102 forks source link

Update YAMLs to conform to Home Assistant developer guidelines? #159

Open pyrodex opened 9 months ago

pyrodex commented 9 months ago

Hello I am seeing the following errors in my HA logs:

2023-09-14 20:04:05.616 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.house_energy_monitor_02_total_watts (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement 'W' which is not a valid unit for the device class ('energy') it is using; expected one of ['MJ', 'GJ', 'kWh', 'Wh', 'MWh']; 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+esphome%22

Should the ESPHome YAML be adjusted to correct these type of invalid measurement types?

PandemiK911 commented 9 months ago

You're right, the device class should be power and not energy. I'm not using those template at the moment. Could you try to change device_class : energy to device_class: power and install the new version to confirm ?

Once done, we could ping @CircuitSetup to modify this or create a PR (dunno how to do this, sorry)

rkm3 commented 1 month ago

I had the same error and think the PR I just issued will fix it. Happy to revise as needed.

CircuitSetup commented 1 month ago

Fixed in #177