Skip to content

Commit

Permalink
Added polling back
Browse files Browse the repository at this point in the history
  • Loading branch information
wardru committed Oct 23, 2023
1 parent c673c9b commit a2bfcb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions platform/panduza_platform/meta_drivers/ammeter.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def __polling_task(self):
"""Task to poll the value
"""
while self.alive:
await asyncio.sleep(0.05)
await asyncio.sleep(self.__polling_cycle)
await self._update_attributes_from_dict({
"measure": {
"value": await self._PZA_DRV_AMMETER_read_measure_value()
Expand Down Expand Up @@ -128,7 +128,7 @@ async def __att_measure_full_update(self):
await self._update_attributes_from_dict({
"measure": {
"value": await self._PZA_DRV_AMMETER_read_measure_value(),
"polling_cycle": 0.05
"polling_cycle": await self.__get_poll_cycle()
}
})

Expand Down
4 changes: 2 additions & 2 deletions platform/panduza_platform/meta_drivers/voltmeter.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def __polling_task(self):
"""Task to poll the value
"""
while self.alive:
await asyncio.sleep(0.05)
await asyncio.sleep(self.__polling_cycle)
await self._update_attributes_from_dict({
"measure": {
"value": await self._PZA_DRV_VOLTMETER_read_measure_value()
Expand Down Expand Up @@ -128,7 +128,7 @@ async def __att_measure_full_update(self):
await self._update_attributes_from_dict({
"measure": {
"value": await self._PZA_DRV_VOLTMETER_read_measure_value(),
"polling_cycle": 0.05
"polling_cycle": await self.__get_poll_cycle()
}
})

Expand Down

0 comments on commit a2bfcb8

Please sign in to comment.