Skip to content

Commit ea05e17

Browse files
authored
v0.1.17
version 0.1.17
2 parents 7d59a65 + e29f071 commit ea05e17

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

pyobs_brot/brotroof.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async def init(self, **kwargs: Any) -> None:
8080

8181
@timeout(300)
8282
async def park(self, **kwargs: Any) -> None:
83-
if self.brot.roof.status == RoofStatus.PARKED:
83+
if self.brot.roof.status == RoofStatus.CLOSED:
8484
return
8585
elif self.brot.roof.status == RoofStatus.ERROR:
8686
await self._error_state("Roof is in error state. Cannot close.")

pyobs_brot/brottelescope.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def __init__(
4242
host: str,
4343
name: str,
4444
port: int = 1883,
45+
temperatures: dict[str, str] | None = None,
4546
keepalive: int = 60,
4647
roof: str = "None",
4748
dome: str = "None",
@@ -51,6 +52,7 @@ def __init__(
5152

5253
self.mqtt = MQTTTransport(host, port)
5354
self.brot = BROT(self.mqtt, name)
55+
self.temperatures: dict[str, str] = {} if temperatures is None else temperatures
5456
self.focus_offset = 0.0
5557
self._dome = dome
5658
self._roof = roof
@@ -210,7 +212,12 @@ async def get_temperatures(self, **kwargs: Any) -> dict[str, float]:
210212
Returns:
211213
Dict containing temperatures.
212214
"""
213-
return {}
215+
data: dict[str, float] = {}
216+
for name, loc in self.temperatures.items():
217+
for sensor in self.mqtt.telemetry.AUXILIARY.SENSOR.values():
218+
if sensor.NAME == loc:
219+
data[name] = sensor.VALUE
220+
return data
214221

215222
async def set_focus(self, focus: float, **kwargs: Any) -> None:
216223
await self._change_motion_status(MotionStatus.SLEWING, interface="IFocuser")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pyobs-brot"
3-
version = "0.1.16"
3+
version = "0.1.17"
44
description = "pyobs module for BROTlib telescopes"
55
authors = [{ name = "Tim-Oliver Husser", email = "[email protected]" }, { name = "Lukas Melzig", email = "[email protected]" }]
66
requires-python = ">=3.11"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)