I use this script, but I did the installation manually, I didn’t use hacs.
[{"id":"c76fa704308a55f5","type":"api-call-service","z":"aa7ff1ce198b9fc9","name":"Indisponível","server":"33803899.487d48","version":5,"debugenabled":false,"domain":"python_script","service":"set_state","areaId":[],"deviceId":[],"entityId":[],"data":"{\"entity_id\":\"{{payload}}\",\"state\":\"{{state}}\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":340,"wires":[[]]},{"id":"7d330ecb0be846ee","type":"inject","z":"aa7ff1ce198b9fc9","name":"","props":[{"p":"payload"},{"p":"state","v":"your_value","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"binary_sensor.pir_corredor","payloadType":"str","x":250,"y":340,"wires":[["c76fa704308a55f5"]]},{"id":"33803899.487d48","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]