Skip to content

Commit

Permalink
Merge pull request #302 from b-rowan/main
Browse files Browse the repository at this point in the history
Update pyasic version and always poll miner
  • Loading branch information
b-rowan authored Jan 25, 2024
2 parents 3fe0438 + 0ad8c91 commit 2fb7126
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions custom_components/miner/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@ async def _async_update_data(self):
"""Fetch sensors from miners."""

miner_ip = self.entry.data[CONF_IP]
if self.miner is None:
self.miner = await pyasic.get_miner(miner_ip)

_LOGGER.debug(f"Found miner :{self.miner}")
self.miner = await pyasic.get_miner(miner_ip)

if self.miner is None:
raise UpdateFailed("Miner Offline")

_LOGGER.debug(f"Found miner :{self.miner}")

try:
if self.miner.api is not None:
if self.miner.api.pwd is not None:
Expand Down
4 changes: 2 additions & 2 deletions custom_components/miner/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"homekit": {},
"iot_class": "local_polling",
"issue_tracker": "https://github.com/Schnitzel/hass-miner/issues",
"requirements": ["pyasic==0.48.5"],
"requirements": ["pyasic==0.49.0"],
"ssdp": [],
"version": "1.1.1b4",
"version": "1.1.1rc1",
"zeroconf": []
}

0 comments on commit 2fb7126

Please sign in to comment.