diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3f9f384d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +controller.py diff --git a/custom_components/smartir/controller.py b/custom_components/smartir/controller.py index 30758f62..c6e49cda 100644 --- a/custom_components/smartir/controller.py +++ b/custom_components/smartir/controller.py @@ -142,10 +142,12 @@ def check_encoding(self, encoding): "by the mqtt controller.") async def send(self, command): + _original = command + _command = _original.replace("\\", "") """Send a command.""" service_data = { 'topic': self._controller_data, - 'payload': command + 'payload': _command } await self.hass.services.async_call( @@ -183,4 +185,4 @@ async def send(self, command): service_data = {'command': json.loads(command)} await self.hass.services.async_call( - 'esphome', self._controller_data, service_data) \ No newline at end of file + 'esphome', self._controller_data, service_data)