Skip to content

Commit 2c8a4cf

Browse files
authored
Renames the Amp sensors to reflect their unit (#479)
- (In|Out)AmpSensorEntity -> (In|Out)MilliampSensorEntity - AmpSolarSensorEntity -> MilliampSolarSensorEntity - Redefines AmpSensorEntity (and the In/Out equivalents) to use Amps This clarification is needed because Smart Home Panel 2 support is being added and it reports current as Amps, not Milliamps. There are also already Deciamp* sensors as precident. Signed-off-by: Timothy Ace <opensource@timothyace.com>
1 parent b8ee461 commit 2c8a4cf

15 files changed

Lines changed: 104 additions & 88 deletions

File tree

custom_components/ecoflow_cloud/devices/internal/delta2_max.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from custom_components.ecoflow_cloud.select import TimeoutDictSelectEntity
88
from custom_components.ecoflow_cloud.sensor import LevelSensorEntity, RemainSensorEntity, TempSensorEntity, \
99
CyclesSensorEntity, \
10-
InWattsSensorEntity, OutWattsSensorEntity, MilliVoltSensorEntity, InAmpSensorEntity, \
10+
InWattsSensorEntity, OutWattsSensorEntity, MilliVoltSensorEntity, InMilliampSensorEntity, \
1111
InMilliVoltSensorEntity, OutMilliVoltSensorEntity, CapacitySensorEntity, QuotaStatusSensorEntity
1212
from custom_components.ecoflow_cloud.switch import BeeperEntity, EnabledEntity
1313

@@ -41,8 +41,8 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
4141

4242
InMilliVoltSensorEntity(client, self, "mppt.inVol", const.SOLAR_1_IN_VOLTS),
4343
InMilliVoltSensorEntity(client, self, "mppt.pv2InVol", const.SOLAR_2_IN_VOLTS),
44-
InAmpSensorEntity(client, self, "mppt.inAmp", const.SOLAR_1_IN_AMPS),
45-
InAmpSensorEntity(client, self, "mppt.pv2InAmp", const.SOLAR_2_IN_AMPS),
44+
InMilliampSensorEntity(client, self, "mppt.inAmp", const.SOLAR_1_IN_AMPS),
45+
InMilliampSensorEntity(client, self, "mppt.pv2InAmp", const.SOLAR_2_IN_AMPS),
4646

4747
# OutWattsSensorEntity(client, self, "pd.carWatts", const.DC_OUT_POWER),
4848
# the same value as pd.carWatts

custom_components/ecoflow_cloud/devices/internal/delta_max.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
InWattsSensorEntity, OutWattsSensorEntity, MilliVoltSensorEntity, \
99
InMilliVoltSensorEntity, OutMilliVoltSensorEntity, CapacitySensorEntity, InWattsSolarSensorEntity, \
1010
InEnergySensorEntity, OutEnergySensorEntity, OutWattsDcSensorEntity, QuotaStatusSensorEntity, \
11-
AmpSensorEntity, InVoltSolarSensorEntity, InAmpSolarSensorEntity, OutVoltDcSensorEntity
11+
MilliampSensorEntity, InVoltSolarSensorEntity, InMilliampSolarSensorEntity, OutVoltDcSensorEntity
1212
from custom_components.ecoflow_cloud.switch import BeeperEntity, EnabledEntity
1313

1414

@@ -33,7 +33,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
3333
LevelSensorEntity(client, self, "ems.f32LcdShowSoc", const.COMBINED_BATTERY_LEVEL_F32, False),
3434
InWattsSensorEntity(client, self, "pd.wattsInSum", const.TOTAL_IN_POWER),
3535
OutWattsSensorEntity(client, self, "pd.wattsOutSum", const.TOTAL_OUT_POWER),
36-
AmpSensorEntity(client, self, "bmsMaster.amp", const.MAIN_BATTERY_CURRENT),
36+
MilliampSensorEntity(client, self, "bmsMaster.amp", const.MAIN_BATTERY_CURRENT),
3737

3838
InWattsSensorEntity(client, self, "inv.inputWatts", const.AC_IN_POWER),
3939
OutWattsSensorEntity(client, self, "inv.outputWatts", const.AC_OUT_POWER),
@@ -43,7 +43,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
4343

4444
InWattsSolarSensorEntity(client, self, "mppt.inWatts", const.SOLAR_IN_POWER),
4545
InVoltSolarSensorEntity(client, self, "mppt.inVol", const.SOLAR_IN_VOLTAGE),
46-
InAmpSolarSensorEntity(client, self, "mppt.inAmp", const.SOLAR_IN_CURRENT),
46+
InMilliampSolarSensorEntity(client, self, "mppt.inAmp", const.SOLAR_IN_CURRENT),
4747

4848
OutWattsDcSensorEntity(client, self, "mppt.outWatts", const.DC_OUT_POWER),
4949
OutVoltDcSensorEntity(client, self, "mppt.outVol", const.DC_OUT_VOLTAGE),
@@ -117,11 +117,11 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
117117
MilliVoltSensorEntity(client, self, "bmsSlave1.vol", const.SLAVE_N_BATTERY_VOLT % 1, False),
118118
MilliVoltSensorEntity(client, self, "bmsSlave1.minCellVol", const.SLAVE_N_MIN_CELL_VOLT % 1, False),
119119
MilliVoltSensorEntity(client, self, "bmsSlave1.maxCellVol", const.SLAVE_N_MAX_CELL_VOLT % 1, False),
120-
AmpSensorEntity(client, self, "bmsSlave1.amp", const.SLAVE_N_BATTERY_CURRENT % 1, False),
120+
MilliampSensorEntity(client, self, "bmsSlave1.amp", const.SLAVE_N_BATTERY_CURRENT % 1, False),
121121
MilliVoltSensorEntity(client, self, "bmsSlave2.vol", const.SLAVE_N_BATTERY_VOLT % 2, False),
122122
MilliVoltSensorEntity(client, self, "bmsSlave2.minCellVol", const.SLAVE_N_MIN_CELL_VOLT % 2, False),
123123
MilliVoltSensorEntity(client, self, "bmsSlave2.maxCellVol", const.SLAVE_N_MAX_CELL_VOLT % 2, False),
124-
AmpSensorEntity(client, self, "bmsSlave2.amp", const.SLAVE_N_BATTERY_CURRENT % 2, False),
124+
MilliampSensorEntity(client, self, "bmsSlave2.amp", const.SLAVE_N_BATTERY_CURRENT % 2, False),
125125
TempSensorEntity(client, self, "bmsSlave2.temp", const.SLAVE_N_BATTERY_TEMP % 2, False, True)
126126
.attr("bmsSlave2.minCellTemp", const.ATTR_MIN_CELL_TEMP, 0)
127127
.attr("bmsSlave2.maxCellTemp", const.ATTR_MAX_CELL_TEMP, 0),

custom_components/ecoflow_cloud/devices/internal/delta_mini.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
InWattsSensorEntity, OutWattsSensorEntity, MilliVoltSensorEntity, \
99
InMilliVoltSensorEntity, OutMilliVoltSensorEntity, CapacitySensorEntity, InWattsSolarSensorEntity, \
1010
InEnergySensorEntity, OutEnergySensorEntity, OutWattsDcSensorEntity, QuotaStatusSensorEntity, \
11-
AmpSensorEntity, InVoltSolarSensorEntity, InAmpSolarSensorEntity, OutVoltDcSensorEntity
11+
MilliampSensorEntity, InVoltSolarSensorEntity, InMilliampSolarSensorEntity, OutVoltDcSensorEntity
1212
from custom_components.ecoflow_cloud.switch import BeeperEntity, EnabledEntity
1313

1414

@@ -42,7 +42,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
4242

4343
InWattsSolarSensorEntity(client, self, "mppt.inWatts", const.SOLAR_IN_POWER),
4444
InVoltSolarSensorEntity(client, self, "mppt.inVol", const.SOLAR_IN_VOLTAGE),
45-
InAmpSolarSensorEntity(client, self, "mppt.inAmp", const.SOLAR_IN_CURRENT),
45+
InMilliampSolarSensorEntity(client, self, "mppt.inAmp", const.SOLAR_IN_CURRENT),
4646

4747
OutWattsDcSensorEntity(client, self, "mppt.outWatts", const.DC_OUT_POWER),
4848
OutVoltDcSensorEntity(client, self, "mppt.outVol", const.DC_OUT_VOLTAGE),
@@ -67,7 +67,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
6767
.attr("bmsMaster.minCellTemp", const.ATTR_MIN_CELL_TEMP, 0)
6868
.attr("bmsMaster.maxCellTemp", const.ATTR_MAX_CELL_TEMP, 0),
6969

70-
AmpSensorEntity(client, self, "bmsMaster.amp", const.MAIN_BATTERY_CURRENT, False),
70+
MilliampSensorEntity(client, self, "bmsMaster.amp", const.MAIN_BATTERY_CURRENT, False),
7171
MilliVoltSensorEntity(client, self, "bmsMaster.vol", const.BATTERY_VOLT, False)
7272
.attr("bmsMaster.minCellVol", const.ATTR_MIN_CELL_VOLT, 0)
7373
.attr("bmsMaster.maxCellVol", const.ATTR_MAX_CELL_VOLT, 0),

custom_components/ecoflow_cloud/devices/internal/delta_pro.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
InWattsSensorEntity, OutWattsSensorEntity, MilliVoltSensorEntity, \
1212
InMilliVoltSensorEntity, OutMilliVoltSensorEntity, CapacitySensorEntity, InWattsSolarSensorEntity, \
1313
InEnergySensorEntity, OutEnergySensorEntity, OutWattsDcSensorEntity, QuotaStatusSensorEntity, \
14-
AmpSensorEntity, InVoltSolarSensorEntity, InAmpSolarSensorEntity, OutVoltDcSensorEntity
14+
MilliampSensorEntity, InVoltSolarSensorEntity, InMilliampSolarSensorEntity, OutVoltDcSensorEntity
1515
from custom_components.ecoflow_cloud.switch import BeeperEntity, EnabledEntity
1616

1717

@@ -45,7 +45,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
4545

4646
InWattsSolarSensorEntity(client, self, "mppt.inWatts", const.SOLAR_IN_POWER),
4747
InVoltSolarSensorEntity(client, self, "mppt.inVol", const.SOLAR_IN_VOLTAGE),
48-
InAmpSolarSensorEntity(client, self, "mppt.inAmp", const.SOLAR_IN_CURRENT),
48+
InMilliampSolarSensorEntity(client, self, "mppt.inAmp", const.SOLAR_IN_CURRENT),
4949

5050
OutWattsDcSensorEntity(client, self, "mppt.outWatts", const.DC_OUT_POWER),
5151
OutVoltDcSensorEntity(client, self, "mppt.outVol", const.DC_OUT_VOLTAGE),
@@ -72,7 +72,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
7272
TempSensorEntity(client, self, "bmsMaster.minCellTemp", const.MIN_CELL_TEMP, False),
7373
TempSensorEntity(client, self, "bmsMaster.maxCellTemp", const.MAX_CELL_TEMP, False),
7474

75-
AmpSensorEntity(client, self, "bmsMaster.amp", const.MAIN_BATTERY_CURRENT, False),
75+
MilliampSensorEntity(client, self, "bmsMaster.amp", const.MAIN_BATTERY_CURRENT, False),
7676
MilliVoltSensorEntity(client, self, "bmsMaster.vol", const.BATTERY_VOLT, False)
7777
.attr("bmsMaster.minCellVol", const.ATTR_MIN_CELL_VOLT, 0)
7878
.attr("bmsMaster.maxCellVol", const.ATTR_MAX_CELL_VOLT, 0),
@@ -121,11 +121,11 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
121121
MilliVoltSensorEntity(client, self, "bmsSlave1.vol", const.SLAVE_N_BATTERY_VOLT % 1, False),
122122
MilliVoltSensorEntity(client, self, "bmsSlave1.minCellVol", const.SLAVE_N_MIN_CELL_VOLT % 1, False),
123123
MilliVoltSensorEntity(client, self, "bmsSlave1.maxCellVol", const.SLAVE_N_MAX_CELL_VOLT % 1, False),
124-
AmpSensorEntity(client, self, "bmsSlave1.amp", const.SLAVE_N_BATTERY_CURRENT % 1, False),
124+
MilliampSensorEntity(client, self, "bmsSlave1.amp", const.SLAVE_N_BATTERY_CURRENT % 1, False),
125125
MilliVoltSensorEntity(client, self, "bmsSlave2.vol", const.SLAVE_N_BATTERY_VOLT % 2, False),
126126
MilliVoltSensorEntity(client, self, "bmsSlave2.minCellVol", const.SLAVE_N_MIN_CELL_VOLT % 2, False),
127127
MilliVoltSensorEntity(client, self, "bmsSlave2.maxCellVol", const.SLAVE_N_MAX_CELL_VOLT % 2, False),
128-
AmpSensorEntity(client, self, "bmsSlave2.amp", const.SLAVE_N_BATTERY_CURRENT % 2, False),
128+
MilliampSensorEntity(client, self, "bmsSlave2.amp", const.SLAVE_N_BATTERY_CURRENT % 2, False),
129129
TempSensorEntity(client, self, "bmsSlave2.temp", const.SLAVE_N_BATTERY_TEMP % 2, False, True)
130130
.attr("bmsSlave2.minCellTemp", const.ATTR_MIN_CELL_TEMP, 0)
131131
.attr("bmsSlave2.maxCellTemp", const.ATTR_MAX_CELL_TEMP, 0),

custom_components/ecoflow_cloud/devices/internal/powerstream.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
BaseSensorEntity, BaseNumberEntity, BaseSelectEntity, BaseSwitchEntity
88
)
99
from custom_components.ecoflow_cloud.sensor import (
10-
AmpSensorEntity, CentivoltSensorEntity, DeciampSensorEntity,
10+
MilliampSensorEntity, CentivoltSensorEntity, DeciampSensorEntity,
1111
DecicelsiusSensorEntity, DecihertzSensorEntity, DeciwattsSensorEntity,
1212
DecivoltSensorEntity, InWattsSolarSensorEntity, LevelSensorEntity,
1313
MiscSensorEntity, RemainSensorEntity, StatusSensorEntity, ReconnectStatusSensorEntity,
@@ -46,7 +46,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
4646
DeciwattsSensorEntity(client, self, "bat_input_watts", "Battery Input Watts"),
4747
DecivoltSensorEntity(client, self, "bat_input_volt", "Battery Input Potential"),
4848
DecivoltSensorEntity(client, self, "bat_op_volt", "Battery Op Potential"),
49-
AmpSensorEntity(client, self, "bat_input_cur", "Battery Input Current"),
49+
MilliampSensorEntity(client, self, "bat_input_cur", "Battery Input Current"),
5050
DecicelsiusSensorEntity(client, self, "bat_temp", "Battery Temperature"),
5151
RemainSensorEntity(client, self, "battery_charge_remain", "Charge Time"),
5252
RemainSensorEntity(client, self, "battery_discharge_remain", "Discharge Time"),
@@ -64,8 +64,8 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
6464
DeciwattsSensorEntity(client, self, "inv_output_watts", "Inverter Output Watts"),
6565
DecivoltSensorEntity(client, self, "inv_input_volt", "Inverter Output Potential", False),
6666
DecivoltSensorEntity(client, self, "inv_op_volt", "Inverter Op Potential"),
67-
AmpSensorEntity(client, self, "inv_output_cur", "Inverter Output Current"),
68-
AmpSensorEntity(client, self, "inv_dc_cur", "Inverter DC Current"),
67+
MilliampSensorEntity(client, self, "inv_output_cur", "Inverter Output Current"),
68+
MilliampSensorEntity(client, self, "inv_dc_cur", "Inverter DC Current"),
6969
DecihertzSensorEntity(client, self, "inv_freq", "Inverter Frequency"),
7070
DecicelsiusSensorEntity(client, self, "inv_temp", "Inverter Temperature"),
7171
MiscSensorEntity(client, self, "inv_relay_status", "Inverter Relay Status"),

custom_components/ecoflow_cloud/devices/internal/river2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from custom_components.ecoflow_cloud.number import ChargingPowerEntity, MaxBatteryLevelEntity, MinBatteryLevelEntity, BatteryBackupLevel
77
from custom_components.ecoflow_cloud.select import DictSelectEntity, TimeoutDictSelectEntity
88
from custom_components.ecoflow_cloud.sensor import LevelSensorEntity, RemainSensorEntity, TempSensorEntity, \
9-
CyclesSensorEntity, InWattsSensorEntity, OutWattsSensorEntity, VoltSensorEntity, InAmpSensorEntity, \
9+
CyclesSensorEntity, InWattsSensorEntity, OutWattsSensorEntity, VoltSensorEntity, InMilliampSensorEntity, \
1010
InVoltSensorEntity, MilliVoltSensorEntity, InMilliVoltSensorEntity, \
1111
OutMilliVoltSensorEntity, ChargingStateSensorEntity, CapacitySensorEntity, StatusSensorEntity, \
1212
QuotaStatusSensorEntity
@@ -38,7 +38,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
3838
InWattsSensorEntity(client, self, "pd.wattsInSum", const.TOTAL_IN_POWER),
3939
OutWattsSensorEntity(client, self, "pd.wattsOutSum", const.TOTAL_OUT_POWER),
4040

41-
InAmpSensorEntity(client, self, "inv.dcInAmp", const.SOLAR_IN_CURRENT),
41+
InMilliampSensorEntity(client, self, "inv.dcInAmp", const.SOLAR_IN_CURRENT),
4242
InVoltSensorEntity(client, self, "inv.dcInVol", const.SOLAR_IN_VOLTAGE),
4343

4444
InWattsSensorEntity(client, self, "inv.inputWatts", const.AC_IN_POWER),

custom_components/ecoflow_cloud/devices/internal/river2_max.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from custom_components.ecoflow_cloud.number import ChargingPowerEntity, MaxBatteryLevelEntity, MinBatteryLevelEntity, BatteryBackupLevel
77
from custom_components.ecoflow_cloud.select import DictSelectEntity, TimeoutDictSelectEntity
88
from custom_components.ecoflow_cloud.sensor import LevelSensorEntity, RemainSensorEntity, TempSensorEntity, \
9-
CyclesSensorEntity, InWattsSensorEntity, OutWattsSensorEntity, VoltSensorEntity, InAmpSensorEntity, \
9+
CyclesSensorEntity, InWattsSensorEntity, OutWattsSensorEntity, VoltSensorEntity, InMilliampSensorEntity, \
1010
InVoltSensorEntity, MilliVoltSensorEntity, InMilliVoltSensorEntity, \
1111
OutMilliVoltSensorEntity, ChargingStateSensorEntity, CapacitySensorEntity, StatusSensorEntity, \
1212
QuotaStatusSensorEntity
@@ -38,7 +38,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
3838
InWattsSensorEntity(client, self, "pd.wattsInSum", const.TOTAL_IN_POWER),
3939
OutWattsSensorEntity(client, self, "pd.wattsOutSum", const.TOTAL_OUT_POWER),
4040

41-
InAmpSensorEntity(client, self, "inv.dcInAmp", const.SOLAR_IN_CURRENT),
41+
InMilliampSensorEntity(client, self, "inv.dcInAmp", const.SOLAR_IN_CURRENT),
4242
InVoltSensorEntity(client, self, "inv.dcInVol", const.SOLAR_IN_VOLTAGE),
4343

4444
InWattsSensorEntity(client, self, "inv.inputWatts", const.AC_IN_POWER),

custom_components/ecoflow_cloud/devices/internal/river_max.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from custom_components.ecoflow_cloud.sensor import LevelSensorEntity, WattsSensorEntity, RemainSensorEntity, \
77
TempSensorEntity, \
88
CyclesSensorEntity, InEnergySensorEntity, InWattsSensorEntity, OutEnergySensorEntity, OutWattsSensorEntity, \
9-
InAmpSensorEntity, AmpSensorEntity, MilliVoltSensorEntity, InMilliVoltSensorEntity, \
9+
InMilliampSensorEntity, MilliampSensorEntity, MilliVoltSensorEntity, InMilliVoltSensorEntity, \
1010
OutMilliVoltSensorEntity, CapacitySensorEntity, QuotaStatusSensorEntity
1111
from custom_components.ecoflow_cloud.switch import EnabledEntity, BeeperEntity, FanModeEntity
1212

@@ -26,7 +26,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
2626
WattsSensorEntity(client, self, "pd.wattsInSum", const.TOTAL_IN_POWER),
2727
WattsSensorEntity(client, self, "pd.wattsOutSum", const.TOTAL_OUT_POWER),
2828

29-
InAmpSensorEntity(client, self, "inv.dcInAmp", const.SOLAR_IN_CURRENT),
29+
InMilliampSensorEntity(client, self, "inv.dcInAmp", const.SOLAR_IN_CURRENT),
3030
InMilliVoltSensorEntity(client, self, "inv.dcInVol", const.SOLAR_IN_VOLTAGE),
3131

3232
InWattsSensorEntity(client, self, "inv.inputWatts", const.AC_IN_POWER),
@@ -54,7 +54,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
5454
TempSensorEntity(client, self, "bmsMaster.minCellTemp", const.MIN_CELL_TEMP, False),
5555
TempSensorEntity(client, self, "bmsMaster.maxCellTemp", const.MAX_CELL_TEMP, False),
5656

57-
AmpSensorEntity(client, self, "bmsMaster.amp", const.BATTERY_AMP, False),
57+
MilliampSensorEntity(client, self, "bmsMaster.amp", const.BATTERY_AMP, False),
5858
MilliVoltSensorEntity(client, self, "bmsMaster.vol", const.BATTERY_VOLT, False)
5959
.attr("bmsMaster.minCellVol", const.ATTR_MIN_CELL_VOLT, 0)
6060
.attr("bmsMaster.maxCellVol", const.ATTR_MAX_CELL_VOLT, 0),
@@ -86,7 +86,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
8686
TempSensorEntity(client, self, "bmsSlave1.minCellTemp", const.SLAVE_MIN_CELL_TEMP, False),
8787
TempSensorEntity(client, self, "bmsSlave1.maxCellTemp", const.SLAVE_MAX_CELL_TEMP, False),
8888

89-
AmpSensorEntity(client, self, "bmsSlave1.amp", const.SLAVE_BATTERY_AMP, False),
89+
MilliampSensorEntity(client, self, "bmsSlave1.amp", const.SLAVE_BATTERY_AMP, False),
9090
MilliVoltSensorEntity(client, self, "bmsSlave1.vol", const.SLAVE_BATTERY_VOLT, False)
9191
.attr("bmsSlave1.minCellVol", const.ATTR_MIN_CELL_VOLT, 0)
9292
.attr("bmsSlave1.maxCellVol", const.ATTR_MAX_CELL_VOLT, 0),

custom_components/ecoflow_cloud/devices/internal/river_mini.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from custom_components.ecoflow_cloud.number import MaxBatteryLevelEntity
55
from custom_components.ecoflow_cloud.sensor import LevelSensorEntity, WattsSensorEntity, TempSensorEntity, \
66
CyclesSensorEntity, InEnergySensorEntity, InWattsSensorEntity, OutEnergySensorEntity, OutWattsSensorEntity, \
7-
AmpSensorEntity, InMilliVoltSensorEntity, \
7+
MilliampSensorEntity, InMilliVoltSensorEntity, \
88
BeMilliVoltSensorEntity
99
from custom_components.ecoflow_cloud.switch import EnabledEntity
1010

@@ -22,7 +22,7 @@ def sensors(self, client: EcoflowApiClient) -> list[BaseSensorEntity]:
2222
BeMilliVoltSensorEntity(client, self, "inv.invOutVol", const.AC_OUT_VOLT),
2323

2424
InMilliVoltSensorEntity(client, self, "inv.dcInVol", const.SOLAR_IN_VOLTAGE),
25-
AmpSensorEntity(client, self, "inv.dcInAmp", const.SOLAR_IN_CURRENT),
25+
MilliampSensorEntity(client, self, "inv.dcInAmp", const.SOLAR_IN_CURRENT),
2626

2727
TempSensorEntity(client, self, "inv.inTemp", const.INV_IN_TEMP),
2828
TempSensorEntity(client, self, "inv.outTemp", const.INV_OUT_TEMP),

0 commit comments

Comments
 (0)