Procházet zdrojové kódy

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 před 4 týdny
rodič
revize
791fd1cf84
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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