mkaiser / Sungrow-SHx-Inverter-Modbus-Home-Assistant

Sungrow SH Integration for Home Assistant for SH3K6, SH4K6, SH5K-20, SH5K-V13, SH3K6-30, SH4K6-30, SH5K-30, SH3.RS, SH3.6RS, SH4.0RS, SH5.0RS, SH6.0RS, SH5.0RT, SH6.0RT, SH8.0RT, SH10RT, SH5.0RT-20, SH6.0RT-20, SH8.0RT-20, SH10RT-20, SH5.0RT-V112, SH6.0RT-V112, SH8.0RT-V112, SH10RT-V112, SH5.0RT-V122, SH6.0RT-V122, SH8.0RT-V122, SH10RT-V122, SH4.6R
305 stars 79 forks source link

modbus_sungrow .yaml #200

Closed Mats1717 closed 8 months ago

Mats1717 commented 8 months ago

Hi I get this warning in the log using latest modbus_sungrow. yaml 2023-10-28

Entity sensor.battery_charge_nominal (<class 'homeassistant.components.template.sensor.SensorTemplate'>) is using native unit of measurement 'kWh' which is not a valid unit for the device class ('battery') it is using; expected one of ['%']; 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+template%22 Entity sensor.battery_charge (<class 'homeassistant.components.template.sensor.SensorTemplate'>) is using native unit of measurement 'kWh' which is not a valid unit for the device class ('battery') it is using; expected one of ['%']; 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+template%22

dylan09 commented 8 months ago

@mkaiser has changed the device_class a few days ago. I think battery is the wrong class for these template sensors.

@Mats1717 Maybe you could change the definitions back to class battery?