Rename bms_temperature_celcius to bms_temperature_celsius
Correct the spelling in the JBD and EcoFlow snapshots, the diagnostic tool, and the tests. UPS.from_dict maps the old name to the new name, so a client still reads data from an older server during an upgrade. InfluxDB and Prometheus now receive this measurement under the new name.
This commit is contained in:
@@ -111,7 +111,7 @@ def test_river3_snapshot_and_serialization(prefix):
|
||||
snap = dev.snapshot
|
||||
assert dev._pkt_version == 3
|
||||
assert snap.bms_capacity_charge_ratio.raw_value == pytest.approx(0.88918)
|
||||
assert snap.bms_temperature_celcius.raw_values == {1: 29}
|
||||
assert snap.bms_temperature_celsius.raw_values == {1: 29}
|
||||
assert snap.ef_input_power_watts.raw_value == 244
|
||||
assert snap.ef_output_power_watts.raw_value == 39
|
||||
assert snap.bms_charge_is_charging.raw_value is True
|
||||
@@ -142,7 +142,7 @@ def test_partial_updates_keep_missing_values_and_preserve_explicit_zero():
|
||||
assert dev.snapshot.bms_charge_is_charging.raw_value is False
|
||||
assert dev.snapshot.bms_charge_is_discharging.raw_value is False
|
||||
assert dev.snapshot.ef_remaining_time_minutes is None
|
||||
assert dev.snapshot.bms_temperature_celcius.raw_values == {1: -5}
|
||||
assert dev.snapshot.bms_temperature_celsius.raw_values == {1: -5}
|
||||
assert dev.snapshot.ef_output_power_watts.raw_value == 44
|
||||
|
||||
|
||||
@@ -150,9 +150,9 @@ def test_cell_temperature_remains_preferred_across_partial_updates():
|
||||
dev = device()
|
||||
dev._record(report(integer(259, 29)))
|
||||
dev._record(report(integer(102, 26)))
|
||||
assert dev.snapshot.bms_temperature_celcius.raw_values == {1: 29}
|
||||
assert dev.snapshot.bms_temperature_celsius.raw_values == {1: 29}
|
||||
dev._record(report(integer(259, 30)))
|
||||
assert dev.snapshot.bms_temperature_celcius.raw_values == {1: 30}
|
||||
assert dev.snapshot.bms_temperature_celsius.raw_values == {1: 30}
|
||||
|
||||
|
||||
def test_remaining_time_tracks_battery_direction_and_missing_estimates():
|
||||
@@ -184,7 +184,7 @@ def test_no_load_sample_matches_display_hours_without_changing_minute_units():
|
||||
dev._record(report(integer(363, 1)))
|
||||
snap = dev.snapshot
|
||||
assert snap.bms_capacity_charge_ratio.raw_value == pytest.approx(0.89)
|
||||
assert snap.bms_temperature_celcius.raw_values == {1: 29}
|
||||
assert snap.bms_temperature_celsius.raw_values == {1: 29}
|
||||
assert snap.ef_input_power_watts.raw_value == 0
|
||||
assert snap.ef_output_power_watts.raw_value == 0
|
||||
assert snap.bms_charge_is_charging.raw_value is False
|
||||
|
||||
Reference in New Issue
Block a user