File tree 1 file changed +18
-0
lines changed
custom_components/solaredge_modbus_multi
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1966,6 +1966,15 @@ def native_value(self):
1966
1966
return self ._platform .decoded_model ["B_Export_Energy_WH" ]
1967
1967
1968
1968
else :
1969
+ if not self ._platform .allow_battery_energy_reset :
1970
+ _LOGGER .warning (
1971
+ (
1972
+ "Battery Export Energy went backwards: Current value " # noqa: B950
1973
+ f"{ self ._platform .decoded_model ['B_Export_Energy_WH' ]} " # noqa: B950
1974
+ f"is less than last value of { self ._last } "
1975
+ )
1976
+ )
1977
+
1969
1978
if self ._platform .allow_battery_energy_reset :
1970
1979
self ._count += 1
1971
1980
_LOGGER .debug (
@@ -2040,6 +2049,15 @@ def native_value(self):
2040
2049
return self ._platform .decoded_model ["B_Import_Energy_WH" ]
2041
2050
2042
2051
else :
2052
+ if not self ._platform .allow_battery_energy_reset :
2053
+ _LOGGER .warning (
2054
+ (
2055
+ "Battery Import Energy went backwards: Current value " # noqa: B950
2056
+ f"{ self ._platform .decoded_model ['B_Import_Energy_WH' ]} " # noqa: B950
2057
+ f"is less than last value of { self ._last } "
2058
+ )
2059
+ )
2060
+
2043
2061
if self ._platform .allow_battery_energy_reset :
2044
2062
self ._count += 1
2045
2063
_LOGGER .debug (
You can’t perform that action at this time.
0 commit comments