From 586d44493ed426c474b069418121398e41e4af73 Mon Sep 17 00:00:00 2001 From: Felipe Martins Diel <41558831+felipediel@users.noreply.github.com> Date: Wed, 27 Jan 2021 18:50:45 -0300 Subject: [PATCH] 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. --- broadlink/remote.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/broadlink/remote.py b/broadlink/remote.py index 6cf32f2..f4b8ffb 100644 --- a/broadlink/remote.py +++ b/broadlink/remote.py @@ -46,10 +46,9 @@ class rm(device): resp = self._send(0x1A) return resp[0] == 1 - def find_rf_packet(self) -> bool: + def find_rf_packet(self) -> None: """Enter radiofrequency learning mode.""" - resp = self._send(0x1B) - return resp[0] == 1 + self._send(0x1B) def check_temperature(self) -> float: """Return the temperature.""" @@ -80,11 +79,6 @@ class rm4(rm): p_len = struct.unpack(" bool: - """Enter radiofrequency learning mode.""" - self._send(0x1B) - return True - def check_humidity(self) -> float: """Return the humidity.""" return self.check_sensors()["humidity"]