Explorar el Código

fix(services): pass entity by id

The expectation of the infrared API does not match what the service
framework gives us.
Jason Rumney hace 4 semanas
padre
commit
ede5ac127f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      custom_components/tuya_local/services.py

+ 1 - 1
custom_components/tuya_local/services.py

@@ -70,7 +70,7 @@ async def async_handle_send_ir_command(entity, call: ServiceCall):
             _LOGGER.error("RF emitters are not yet supported by this service")
             continue
         await infrared.async_send_command(
-            entity.hass, emitter, TuyaRemoteCommand(code=code)
+            entity.hass, emitter.entity_id, TuyaRemoteCommand(code=code)
         )
         at_least_one_sent = True