Refine debug message
This commit is contained in:
5
tapo_exporter.py
Normal file → Executable file
5
tapo_exporter.py
Normal file → Executable file
@@ -36,7 +36,7 @@ class TplinkT315:
|
|||||||
await self.hubDev.update()
|
await self.hubDev.update()
|
||||||
except KasaException as e:
|
except KasaException as e:
|
||||||
self.hubDev = None
|
self.hubDev = None
|
||||||
print(f"[TplinkT315::connect] Error: {e}")
|
print(f"[TplinkT315::connect] Hub Error: {e}")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -44,7 +44,7 @@ class TplinkT315:
|
|||||||
await self.t315Dev.update()
|
await self.t315Dev.update()
|
||||||
except KasaException as e:
|
except KasaException as e:
|
||||||
self.t315Dev = None
|
self.t315Dev = None
|
||||||
print(f"[TplinkT315::connect] Error: {e}")
|
print(f"[TplinkT315::connect] Device Error: {e}")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
@@ -98,6 +98,7 @@ def getSecrets(fileanme):
|
|||||||
async def main(configs):
|
async def main(configs):
|
||||||
secrect = getSecrets(configs.get("secret_filepath", DEFAULT_POLLING_INTERVAL))
|
secrect = getSecrets(configs.get("secret_filepath", DEFAULT_POLLING_INTERVAL))
|
||||||
if secrect is None:
|
if secrect is None:
|
||||||
|
print(f'Cannot read secret file({configs.get("secret_filepath", DEFAULT_POLLING_INTERVAL)})')
|
||||||
return
|
return
|
||||||
|
|
||||||
hubIp = secrect["ip"]
|
hubIp = secrect["ip"]
|
||||||
|
|||||||
Reference in New Issue
Block a user