refactor: fix merge.

This commit is contained in:
UpstreamData
2024-01-15 13:09:23 -07:00
parent f1501718a3
commit e45e51ce65
19 changed files with 373 additions and 279 deletions

View File

@@ -29,6 +29,7 @@ class ePICWebAPI(BaseWebAPI):
self.username = "root"
self.pwd = settings.get("default_epic_password", "letmein")
self.token = None
self.port = 4028
async def send_command(
self,
@@ -50,13 +51,13 @@ class ePICWebAPI(BaseWebAPI):
"password": self.pwd,
}
response = await client.post(
f"http://{self.ip}:4028/{command}",
f"http://{self.ip}:{self.port}/{command}",
timeout=5,
json=epic_param,
)
else:
response = await client.get(
f"http://{self.ip}:4028/{command}",
f"http://{self.ip}:{self.port}/{command}",
timeout=5,
)
if not response.status_code == 200: