I have an Eastron SDM120M modbus meter which has a couple of entities which cannot be correctly defined in HA, as per:
- name: ee11_01
type: rtuovertcp
host: 192.168.1.51
port: 8888
delay: 0
message_wait_milliseconds: 30
timeout: 5
sensors:
- name: "EV Charger Import Reactive Energy"
unique_id: "EV Charger Import Reactive Energy"
address: 76
input_type: input
slave: 100
precision: 2
data_type: float32
unit_of_measurement: kvarh
device_class: energy
# why is there no reactive_energy !?!?!
state_class: total_increasing
- name: "EV Charger Export Reactive Energy"
unique_id: "EV Charger Export Reactive Energy"
address: 78
input_type: input
slave: 100
precision: 2
data_type: float32
unit_of_measurement: kvarh
device_class: energy
# why is there no reactive_energy !?!?!
state_class: total_increasing
- name: "EV Charger Total Reactive Energy"
unique_id: "EV Charger Total Reactive Energy"
address: 344
input_type: input
slave: 100
precision: 2
data_type: float32
unit_of_measurement: kvarh
device_class: energy
# why is there no reactive_energy !?!?!
state_class: total_increasing
The units etc for the SDM120M can be seen here on page 3:
The units should be: “varh” and “kvarh”
Need to update this to include reactive_energy with “varh” and “kvarh”
Reviewing other power/energy units defined I also see a gap which should be fixed also:
SensorDeviceClass.REACTIVE_POWER only has “var” and should also have “kvar”
SensorDeviceClass.APPARENT_POWER only has “VA” and should also have “kVA”
This is the (same?) issue link which doesnt seem to have been actioned:
This is the error as per current defined “energy”
Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:731
integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 15:15:58 (3 occurrences)
Last logged: 15:15:58
* Entity sensor.ev_charger_import_reactive_energy (<class 'homeassistant.components.modbus.sensor.ModbusRegisterSensor'>) is using native unit of measurement 'kvarh' which is not a valid unit for the device class ('energy') it is using; expected one of ['MJ', 'MWh', 'kWh', 'GJ', 'Wh']; 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+modbus%22
* Entity sensor.ev_charger_export_reactive_energy (<class 'homeassistant.components.modbus.sensor.ModbusRegisterSensor'>) is using native unit of measurement 'kvarh' which is not a valid unit for the device class ('energy') it is using; expected one of ['MJ', 'MWh', 'kWh', 'GJ', 'Wh']; 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+modbus%22
* Entity sensor.ev_charger_total_reactive_energy (<class 'homeassistant.components.modbus.sensor.ModbusRegisterSensor'>) is using native unit of measurement 'kvarh' which is not a valid unit for the device class ('energy') it is using; expected one of ['MJ', 'MWh', 'kWh', 'GJ', 'Wh']; 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+modbus%22
Can we add this please?
Thanks