SmartIR
SmartIR copied to clipboard
ESPHome remote not working in 2025.2.5
Hi. Tried to setup it under 2025.2.5 and failed.
I added a esphome device with:
api:
services:
- service: send_raw_command
variables:
command: int[]
then:
- remote_transmitter.transmit_raw:
code: !lambda 'return command;'
And then added a config to HA:
smartir:
climate:
- platform: smartir
name: OfficeAC1
unique_id: office_ac
device_code: 1901
controller_data: ir_remote_send_raw_command
temperature_sensor: sensor.tvocsensor_temperature
humidity_sensor: sensor.tvocsensor_humidity
Then I tried to on/off air conditioner. First I got an key error for fan_mode 'auto' key. I changed 1901.json renaming 'Auto + Swing' to 'auto' to fix it.
Then I got this error:
File "/config/custom_components/smartir/climate.py", line 383, in send_command
await self._controller.send(
self._commands[operation_mode][fan_mode][target_temperature])
File "/config/custom_components/smartir/controller.py", line 111, in send
await self.hass.services.async_call(
'remote', 'send_command', service_data)
File "/usr/src/homeassistant/homeassistant/core.py", line 2759, in async_call
processed_data: dict[str, Any] = handler.schema(service_data)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 259, in __call__
return self._exec((Schema(val) for val in self.validators), v)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 386, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 382, in _exec
v = func(v)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 205, in __call__
return self._compiled([], data)
~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 779, in validate_callable
return schema(data)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 205, in __call__
return self._compiled([], data)
~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 549, in validate_dict
return base_validate(path, data.items(), out)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 382, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data['entity_id']
What i'm doing wrong?
1901 - is gone (not yours) check it
Hello @mihail4anov, I have a similar error and don't really understand what "gone"?
This error originated from a custom integration.
Logger: custom_components.smartir.climate
Source: custom_components/smartir/climate.py:383
integration: SmartIR (documentation)
First occurred: 01:29:29 (1 occurrence)
Last logged: 01:29:29
not a valid value for dictionary value @ data['entity_id']
Traceback (most recent call last):
File "/config/custom_components/smartir/climate.py", line 383, in send_command
await self._controller.send(
self._commands[operation_mode][fan_mode][target_temperature])
File "/config/custom_components/smartir/controller.py", line 111, in send
await self.hass.services.async_call(
'remote', 'send_command', service_data)
File "/usr/src/homeassistant/homeassistant/core.py", line 2800, in async_call
processed_data: dict[str, Any] = handler.schema(service_data)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 259, in __call__
return self._exec((Schema(val) for val in self.validators), v)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 386, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 382, in _exec
v = func(v)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 205, in __call__
return self._compiled([], data)
~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 779, in validate_callable
return schema(data)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 205, in __call__
return self._compiled([], data)
~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 549, in validate_dict
return base_validate(path, data.items(), out)
File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 382, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data['entity_id']
HA conf
smartir:
climate:
- platform: smartir
name: Office AC
unique_id: office_ac
device_code: 2400
controller_data: avatto_ir_remote_send_raw_command
temperature_sensor: sensor.avatto_ir_remote_temperature
ESPHome
substitutions:
name: avatto-ir-remote
friendly_name: avatto-ir-remote
esphome:
name: ${name}
friendly_name: ${friendly_name}
...
esp8266:
board: esp01_1m
...
api:
encryption:
key: "***"
services:
- service: send_raw_command
variables:
command: int[]
then:
- remote_transmitter.transmit_raw:
code: !lambda 'return command;'
Hello @mihail4anov, I have a similar error and don't really understand what "gone"?
This error originated from a custom integration. Logger: custom_components.smartir.climate Source: custom_components/smartir/climate.py:383 integration: SmartIR (documentation) First occurred: 01:29:29 (1 occurrence) Last logged: 01:29:29 not a valid value for dictionary value @ data['entity_id'] Traceback (most recent call last): File "/config/custom_components/smartir/climate.py", line 383, in send_command await self._controller.send( self._commands[operation_mode][fan_mode][target_temperature]) File "/config/custom_components/smartir/controller.py", line 111, in send await self.hass.services.async_call( 'remote', 'send_command', service_data) File "/usr/src/homeassistant/homeassistant/core.py", line 2800, in async_call processed_data: dict[str, Any] = handler.schema(service_data) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 259, in __call__ return self._exec((Schema(val) for val in self.validators), v) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 386, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.13/site-packages/voluptuous/validators.py", line 382, in _exec v = func(v) File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 205, in __call__ return self._compiled([], data) ~~~~~~~~~~~~~~^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 779, in validate_callable return schema(data) File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 205, in __call__ return self._compiled([], data) ~~~~~~~~~~~~~~^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 549, in validate_dict return base_validate(path, data.items(), out) File "/usr/local/lib/python3.13/site-packages/voluptuous/schema_builder.py", line 382, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data['entity_id']HA conf
smartir: climate: - platform: smartir name: Office AC unique_id: office_ac device_code: 2400 controller_data: avatto_ir_remote_send_raw_command temperature_sensor: sensor.avatto_ir_remote_temperatureESPHome
substitutions: name: avatto-ir-remote friendly_name: avatto-ir-remote esphome: name: ${name} friendly_name: ${friendly_name} ... esp8266: board: esp01_1m ... api: encryption: key: "***" services: - service: send_raw_command variables: command: int[] then: - remote_transmitter.transmit_raw: code: !lambda 'return command;'
/homeassistant/custom_components/smartir/codes/climate/
Thank you for your answer! But no, file 2400.json was added automatically by the addon
Thank you for your answer! But no, file 2400.json was added automatically by the addon
![]()
Probably you have mistake in the path? I am not sure, but doble check folder structure and download the file drom here https://github.com/smartHomeHub/SmartIR/tree/master/codes/climate
Thank you again! The problem was a bit stupid. @Regressor and I tried to use codes for Broadlink, but not ESPhome. So we need to find a way to encode commands from
"off": "JgDmAHkwEygRKBIREBESEBEoERERERInESkSEBEoERERERInESgSEREpECkSEBERESgREREREigQERIQERERERIQEREQEhAREhAREREREhARERASEBEREREREhARERERECkREREREicSKBIQEREREREQERERERERESgREREREhAREREREBIQEhARERESKBApEhASDxIRERERERARERERERERERERERASEBERERESERAREREREBIQKBIpECkRKRARERERERERERERERApEREREREREREQEhEoERERKBIQERERKRApEhASAA0F",
to
"off": "[3500, -1700, 450, -1250, 450, -1250, 450, -390, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -1250, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -1250, 450, -390, 450, -1250, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -9000, 3500, -1700, 450, -1250, 450, -1250, 450, -390, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -1250, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -1250, 450, -390, 450, -1250, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -1250, 450, -1250, 450, -390, 450, -390, 450, -390, 450, -1250, 450, -1250, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -390, 450, -1250, 450, -390, 450, -390, 450, -390, 450, -1250, 450, -390, 450]",
Here is the converter - https://pasthev.github.io/sensus/