소스 검색

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