mirror of
https://github.com/mjg59/python-broadlink.git
synced 2024-11-22 07:00:12 +01:00
Change rm.find_rf_packet()'s return value to None (#527)
Change rm.find_rf_packet()'s return value to None. If there is no exception, it worked.
This commit is contained in:
parent
21fa2a20bf
commit
586d44493e
@ -46,10 +46,9 @@ class rm(device):
|
|||||||
resp = self._send(0x1A)
|
resp = self._send(0x1A)
|
||||||
return resp[0] == 1
|
return resp[0] == 1
|
||||||
|
|
||||||
def find_rf_packet(self) -> bool:
|
def find_rf_packet(self) -> None:
|
||||||
"""Enter radiofrequency learning mode."""
|
"""Enter radiofrequency learning mode."""
|
||||||
resp = self._send(0x1B)
|
self._send(0x1B)
|
||||||
return resp[0] == 1
|
|
||||||
|
|
||||||
def check_temperature(self) -> float:
|
def check_temperature(self) -> float:
|
||||||
"""Return the temperature."""
|
"""Return the temperature."""
|
||||||
@ -80,11 +79,6 @@ class rm4(rm):
|
|||||||
p_len = struct.unpack("<H", payload[:0x2])[0]
|
p_len = struct.unpack("<H", payload[:0x2])[0]
|
||||||
return payload[0x6:p_len+2]
|
return payload[0x6:p_len+2]
|
||||||
|
|
||||||
def find_rf_packet(self) -> bool:
|
|
||||||
"""Enter radiofrequency learning mode."""
|
|
||||||
self._send(0x1B)
|
|
||||||
return True
|
|
||||||
|
|
||||||
def check_humidity(self) -> float:
|
def check_humidity(self) -> float:
|
||||||
"""Return the humidity."""
|
"""Return the humidity."""
|
||||||
return self.check_sensors()["humidity"]
|
return self.check_sensors()["humidity"]
|
||||||
|
Loading…
Reference in New Issue
Block a user