test
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 37s
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 37s
This commit is contained in:
parent
bcb97819f1
commit
63e957a5a6
2 changed files with 11 additions and 10 deletions
|
@ -24,6 +24,7 @@ def run_telnet_command(powerbar, command):
|
|||
|
||||
for _ in range(retries):
|
||||
try:
|
||||
check_input_error(tn)
|
||||
tn = get_telnet_connection(powerbar)
|
||||
tn.write(f"{command}\r\n".encode('ascii'))
|
||||
tn.close()
|
||||
|
|
|
@ -220,8 +220,8 @@ def powebar_group_action(group, action):
|
|||
print(f"Turning {action} powerbar {powerbar} outlet {outlets}")
|
||||
|
||||
if powerbars[powerbar]['method'] == "telnet":
|
||||
|
||||
command = run_telnet_command(powerbar,f"{action} {outlets}")
|
||||
|
||||
if command:
|
||||
for outlet in device['outlets']:
|
||||
if outlet in powerbars[powerbar]['outlets']:
|
||||
|
|
Loading…
Reference in a new issue