Rest_command - Can someone please explain what is wrong with this?

I have followed code and tried a lot of different combinations but have not gotten any sequence.

=================================

After restart, I am getting the following error,

Automation with alias ‘r1’ could not be validated and has been disabled: Service iot_r1 does not match format . for dictionary value @ data[‘action’][0][‘service’]. Got ‘iot_r1’

Can some expert help with this error? I tried a lot of different options and followed various articles but did not get success. The error keeps coming after every restart. I am new to HA and Python.

iot_r1 isn’t a valid service call, which is exactly what the error message says. The REST command that you defined creates a service called rest_command.iot_r1.

Thank you for your help. It worked