Loading custom_components/smartir/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ from homeassistant.helpers.typing import ConfigType _LOGGER = logging.getLogger(__name__) DOMAIN = 'smartir' VERSION = '1.7.5' VERSION = '1.8.0' MANIFEST_URL = ( "https://raw.githubusercontent.com/" "smartHomeHub/SmartIR/{}/" Loading custom_components/smartir/controller.py +5 −4 Original line number Diff line number Diff line Loading @@ -18,18 +18,18 @@ LOOKIN_CONTROLLER = 'LOOKin' ENC_BASE64 = 'Base64' ENC_HEX = 'Hex' ENC_PRONTO = 'Pronto' ENC_PRONTO_HEX = 'ProntoHex' ENC_RAW = 'Raw' BROADLINK_COMMANDS_ENCODING = [ENC_BASE64, ENC_HEX, ENC_PRONTO] XIAOMI_COMMANDS_ENCODING = [ENC_PRONTO, ENC_RAW] MQTT_COMMANDS_ENCODING = [ENC_RAW] LOOKIN_COMMANDS_ENCODING = [ENC_PRONTO_HEX, ENC_RAW] LOOKIN_COMMANDS_ENCODING = [ENC_PRONTO, ENC_RAW] class Controller(): def __init__(self, hass, controller, encoding, controller_data): if controller not in [ BROADLINK_CONTROLLER, XIAOMI_CONTROLLER, MQTT_CONTROLLER]: BROADLINK_CONTROLLER, XIAOMI_CONTROLLER, MQTT_CONTROLLER, LOOKIN_CONTROLLER]: raise Exception("The controller is not supported.") if controller == BROADLINK_CONTROLLER: Loading Loading @@ -107,8 +107,9 @@ class Controller(): 'mqtt', 'publish', service_data) if self._controller == LOOKIN_CONTROLLER: encoding = self._encoding.lower().replace('pronto', 'prontohex') url = f"http://{self._controller_data}/commands/ir/" \ f"{self._encoding.lower()}/{command}" f"{encoding}/{command}" await self.hass.async_add_executor_job( requests.get, url ) No newline at end of file custom_components/smartir/manifest.json +2 −2 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ "requirements": ["aiofiles==0.5.0"], "homeassistant": "0.96.0", "updater": { "version": "1.7.5", "releaseNotes": "-- Fix doing I/O", "version": "1.8.0", "releaseNotes": "-- Adds support for LOOKin IR controller", "files": [ "__init__.py", "climate.py", Loading Loading
custom_components/smartir/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ from homeassistant.helpers.typing import ConfigType _LOGGER = logging.getLogger(__name__) DOMAIN = 'smartir' VERSION = '1.7.5' VERSION = '1.8.0' MANIFEST_URL = ( "https://raw.githubusercontent.com/" "smartHomeHub/SmartIR/{}/" Loading
custom_components/smartir/controller.py +5 −4 Original line number Diff line number Diff line Loading @@ -18,18 +18,18 @@ LOOKIN_CONTROLLER = 'LOOKin' ENC_BASE64 = 'Base64' ENC_HEX = 'Hex' ENC_PRONTO = 'Pronto' ENC_PRONTO_HEX = 'ProntoHex' ENC_RAW = 'Raw' BROADLINK_COMMANDS_ENCODING = [ENC_BASE64, ENC_HEX, ENC_PRONTO] XIAOMI_COMMANDS_ENCODING = [ENC_PRONTO, ENC_RAW] MQTT_COMMANDS_ENCODING = [ENC_RAW] LOOKIN_COMMANDS_ENCODING = [ENC_PRONTO_HEX, ENC_RAW] LOOKIN_COMMANDS_ENCODING = [ENC_PRONTO, ENC_RAW] class Controller(): def __init__(self, hass, controller, encoding, controller_data): if controller not in [ BROADLINK_CONTROLLER, XIAOMI_CONTROLLER, MQTT_CONTROLLER]: BROADLINK_CONTROLLER, XIAOMI_CONTROLLER, MQTT_CONTROLLER, LOOKIN_CONTROLLER]: raise Exception("The controller is not supported.") if controller == BROADLINK_CONTROLLER: Loading Loading @@ -107,8 +107,9 @@ class Controller(): 'mqtt', 'publish', service_data) if self._controller == LOOKIN_CONTROLLER: encoding = self._encoding.lower().replace('pronto', 'prontohex') url = f"http://{self._controller_data}/commands/ir/" \ f"{self._encoding.lower()}/{command}" f"{encoding}/{command}" await self.hass.async_add_executor_job( requests.get, url ) No newline at end of file
custom_components/smartir/manifest.json +2 −2 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ "requirements": ["aiofiles==0.5.0"], "homeassistant": "0.96.0", "updater": { "version": "1.7.5", "releaseNotes": "-- Fix doing I/O", "version": "1.8.0", "releaseNotes": "-- Adds support for LOOKin IR controller", "files": [ "__init__.py", "climate.py", Loading