Skip to content

Commit

Permalink
console_batt (#2)
Browse files Browse the repository at this point in the history
* Update calc.py

add console_batt for wn1980 console

* add console_batt

* Update fake_client.py for console_batt

* Update const.py for console_batt

* Update test_calc.py for console_batt

* Update test_server.py for console_batt
  • Loading branch information
pantonvich authored Jan 29, 2024
1 parent eda6bd1 commit bd3d0b0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions misc/fake_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
'soilmoisture1': 0,
'wh65batt': 1,
'wh25batt': 0,
'console_bat': 2.5,
'soilbatt1': 1.5,
'leak_ch1': 0,
'leakbatt1': 5,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

PROJECT_DIR = Path(__file__).parent.resolve()
README_FILE = PROJECT_DIR / "README.md"
VERSION = "2023.5.0"
VERSION = "2023.5.1"


setup(
Expand Down
1 change: 1 addition & 0 deletions tests/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"ws90cap_volt": "5.4",
"ws90_ver": "119",
"wh90batt": "2.74",
"console_batt": "2.5",
"freq": "868M",
"model": "GW2000A",
}
1 change: 1 addition & 0 deletions tests/test_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def test_gw2000a_v2():
"tempinf": 78.8,
"uv": 4,
"wh90batt": 2.74,
"console_batt": 2.5,
"windchillc": None,
"windchillf": None,
"winddir": 289,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ def on_change(sensor: server.EcoWittSensor) -> None:
text = await resp.text()
assert text == "OK"

assert len(sensors) == 89
assert len(ecowitt_server.sensors) == 89
assert len(sensors) == 90
assert len(ecowitt_server.sensors) == 90
assert len(ecowitt_server.stations) == 2

0 comments on commit bd3d0b0

Please sign in to comment.