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:
@@ -145,6 +145,11 @@ class TestUPS:
|
||||
assert isinstance(items["bms_temps"], BMSMultiField)
|
||||
assert items["bms_temps"].raw_values == {1: 25.0}
|
||||
|
||||
def test_from_dict_corrects_renamed_field(self):
|
||||
field = {"help": "Temperature", "label": "sensor", "raw_values": {1: 25.0}, "values": {1: "25.00"}}
|
||||
ups = UPS.from_dict({"bms_temperature_celcius": field})
|
||||
assert [name for name, _ in ups.items()] == ["bms_temperature_celsius"]
|
||||
|
||||
def test_bool_true_when_populated(self):
|
||||
assert bool(self._snapshot()) is True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user