06-05-2024, 12:19 PM
add all "kwh sensor" these two options:
state_class: total_increasing
device_class: energy
for example:
- platform: modbus_controller
state_class: total_increasing
device_class: energy
modbus_controller_id: modbus_hub_m30
address: 121
register_type: holding
name: m30_1_energy_1
id: m30_1_energy_1
unit_of_measurement: kWh
accuracy_decimals: 2
value_type: U_WORD
state_class: total_increasing
device_class: energy
for example:
- platform: modbus_controller
state_class: total_increasing
device_class: energy
modbus_controller_id: modbus_hub_m30
address: 121
register_type: holding
name: m30_1_energy_1
id: m30_1_energy_1
unit_of_measurement: kWh
accuracy_decimals: 2
value_type: U_WORD