rrd path updated

This commit is contained in:
2026-08-30 12:30:07 +02:00
parent 20fa7cb67d
commit 3224f27f39
3 changed files with 13 additions and 6 deletions
+5 -5
View File
@@ -5,11 +5,11 @@ the readings in RRDtool databases, and serves a responsive graph dashboard.
## What it stores ## What it stores
The service creates `outdoor.rrd`, `wind.rrd`, `bedroom.rrd`, `study.rrd`, and The service creates `netatmo_outdoor.rrd`, `netatmo_wind.rrd`,
`living.rrd`. Each has ten-minute archives for the last two weeks and six-hour `netatmo_bedroom.rrd`, `netatmo_study.rrd`, and `netatmo_living.rrd`. Each has
archives covering a year. Day, two-week, and year PNG graphs are rendered on ten-minute archives for the last two weeks and six-hour archives covering a
demand. The wind graph splits average wind into 12 colored direction bands and year. Day, two-week, and year PNG graphs are rendered on demand. The wind graph
draws gusts as a line. splits average wind into 12 colored direction bands and draws gusts as a line.
The Outdoor module does not contain a pressure sensor, so `outdoor.rrd` combines The Outdoor module does not contain a pressure sensor, so `outdoor.rrd` combines
its temperature/humidity with pressure from the main station. A module without its temperature/humidity with pressure from the main station. A module without
+1 -1
View File
@@ -36,7 +36,7 @@ class RRDStore:
def path(self, name: str) -> Path: def path(self, name: str) -> Path:
if name not in SCHEMAS: if name not in SCHEMAS:
raise KeyError(name) raise KeyError(name)
return self.folder / f"{name}.rrd" return self.folder / f"netatmo_{name}.rrd"
def ensure_all(self) -> None: def ensure_all(self) -> None:
self.folder.mkdir(parents=True, exist_ok=True) self.folder.mkdir(parents=True, exist_ok=True)
+7
View File
@@ -0,0 +1,7 @@
from netatmo_service.rrd import RRDStore
def test_rrd_files_have_netatmo_prefix(tmp_path):
store = RRDStore(tmp_path)
assert store.path("outdoor") == tmp_path / "netatmo_outdoor.rrd"
assert store.path("wind") == tmp_path / "netatmo_wind.rrd"