Skip to content

Commit

Permalink
Sensunits can not always answer on status requests
Browse files Browse the repository at this point in the history
  • Loading branch information
cereal2nd committed Oct 8, 2024
1 parent f26f18e commit a960cd5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions duotecno/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,8 @@ async def handlePacket(self, packet: BaseMessage) -> None:
await super().handlePacket(packet)

async def requestStatus(self) -> None:
await self.writer(f"[137,16,{self.node.address},{self.unit}]")
await self.writer(f"[137,17,{self.node.address},{self.unit}]")
await self.writer(f"[137,18,{self.node.address},{self.unit}]")
await self.writer(f"[137,19,{self.node.address},{self.unit}]")
await super().requestStatus()
# We should never do this for sensunits, as not all senseunits will work
pass

async def set_preset(self, preset: int) -> None:
await self.writer(f"[136,13,{self.node.address},{self.unit},{preset}]")
Expand Down

0 comments on commit a960cd5

Please sign in to comment.