Przeglądaj źródła

fix(services): Pass command anonymously

The parameter name selected by AI was different than used by HA, so
it failed when passed as a keyword. Examples show it being passed anonymously,
so follow that. Also pass the context from the service call for logbook
attribution.
Jason Rumney 4 tygodni temu
rodzic
commit
791fd1cf84
1 zmienionych plików z 1 dodań i 1 usunięć
  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, cmd=TuyaRemoteCommand(code=code)
+            entity.hass, emitter, TuyaRemoteCommand(code=code), context=call.context
         )
         at_least_one_sent = True