Foscam C1 Motion Detection integration

Thanks dude for fast help,

Yes my indent is correct, to test, i copy / paste your code in my yaml, same error:

Command failed: curl -k --silent "https://10.0.X.X:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=#######&pwd=########" | grep -oP "(?<=isEnable>).*?(?=</isEnable>)"

My motion detection is started on my foscam but the switch not stay ON in dashboard. I think the command_state does not keep or check the Motion status.

Or a pb with: (?<=isEnable>).*?(?=</isEnable>)

Any idéa?

Nobody meets same problem?

Thx