ソースを参照

fix(services): pass entity by id

The expectation of the infrared API does not match what the service
framework gives us.
Jason Rumney 4 週間 前
コミット
ede5ac127f
1 ファイル変更1 行追加1 行削除
  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