Hi, I have a strange behaviour in an Esphome script: in an automation routine I need to call a service in HA that switch on another entity in another esphome device. It seems simple but If I call the service from the automation it works, If I call from a script it makes the device reboot. Why?
Sorry for capslock, consider lowercase, I just renamed my entity for clarity.
I could have just call from the automation, but I need to filter the multiple received RF signal, so I used a script single mode…
EDIT:
Probably there is a problem handling multiple (2/3 max) automation:
if I delay before HA service call in order to wait for busy automation, it works:
Do you need wifi settings too? I think when looking for a problem it’s best to remove all unnecessary parts to focus on the defect. In this case, as I have already written, the bug occurs if the same radio code is received 2 or three times in a short time; if the script is still running, despite being in single mode,The service call generates a reboot(memory?). By keeping the loop busy with a delay I solved it. It would be advisable to be able to filter the signals received directly in the automation…