Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #67 from wayne-love/hotfix/syntax-fix
Browse files Browse the repository at this point in the history
Fix il-formatted print statements
  • Loading branch information
liaan authored Feb 13, 2021
2 parents b5e49ce + 259672c commit 7f8f7d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion broadlink_ac_mqtt/AcToMqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test(self,config):

device_bla = broadlink.gendevice(devtype=0xFFFFFFF, host=(device['ip'],device['port']),mac = bytearray.fromhex(device['mac']), name=device['name'])
status = device_bla.set_temperature(32)
print status
#print status


def discover(self):
Expand Down
6 changes: 3 additions & 3 deletions broadlink_ac_mqtt/classes/broadlink/ac_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ def send_packet(self, command, payload):
packet[0x20] = checksum & 0xff
packet[0x21] = checksum >> 8

print 'Sending Packet:\n'+''.join(format(x, '02x') for x in packet)+"\n"
#print 'Sending Packet:\n'+''.join(format(x, '02x') for x in packet)+"\n"
starttime = time.time()

with self.lock:
Expand All @@ -1156,12 +1156,12 @@ def send_packet(self, command, payload):
self.cs.sendto(packet, self.host)
self.cs.settimeout(1)
response = self.cs.recvfrom(1024)
print response
#print response
break
except socket.timeout:
if (time.time() - starttime) < self.timeout:
pass
print "timedout"
#print "timedout"
raise ConnectTimeout(200,self.host)
return bytearray(response[0])

Expand Down

0 comments on commit 7f8f7d4

Please sign in to comment.