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
344 stars 92 forks source link

state_class not defined for some sensors #169

Closed phil11c closed 11 months ago

phil11c commented 1 year ago

A lot of sensors do not have state_class (measurement, total or total_increasing) defined. For that reason no long-term statistics are available for those sensors.

Not sure if this is intentionally - if so, i will keep on adding this after every new release.

mkaiser commented 1 year ago

which ones are you missing?

phil11c commented 1 year ago

Thanks for your fast reply.

sg_inverter_temperature sg_mppt1_voltage sg_mppt1_current sg_mppt2_voltage sg_mppt2_current sg_bms_max_charging_current sg_bms_max_discharging_current sg_battery_voltage sg_battery_current sg_battery_temperature sg_battery_capacity sg_mppt1_power sg_mppt2_power sg_phase_a_power sg_phase_b_power sg_phase_c_power sg_battery_charge_nom sg_battery_charge

mkaiser commented 1 year ago

I guess it won't hurt to add the state_classes there.

but sg_bms_max_charging_current sg_bms_max_discharging_current

never changed in my system. Are they changing in yours?

phil11c commented 1 year ago

Thanks for adding them.

A battery is on my roadmap, right now i don't have one. So no, they are not changing :-)

Louisbertelsmann commented 1 year ago

They're changing, at least on the Sungrow battery, when the bms limits charging and discharging speeds, for example when it's too cold for the battery, the BMS limits the charging current.