Usage of ACTION MAV_ACTION_STORAGE_WRITE to PERMANENTLY write the RAM contents to EEPROM

Hi,

I have a Lidar connected to my Pixhawk over I2C. My application demands disabling the Lidar in flight. Hence, I am setting parameter “SENS_EN_LL40LS” to “0” using master.mav.param_set_send(). I recheck the value of the parameter using master.mav.param_request_read_send() and it is set to “0”. However, Lidar is still sensing the distance and is not disabled. This may be attributed to requirement of reboot after changing parameter “SENS_EN_LL40LS”. Is it possible to use master.mav.action_send(master.target_system, master.target_component, MAV_ACTION_STORAGE_WRITE) to write value of the parameter to EEPROM and force disable Lidar?

I tried using master.mav.action_send(master.target_system, master.target_component, MAV_ACTION_STORAGE_WRITE). However, I am getting error: AttributeError: ‘MAVLink’ object has no attribute ‘action_send’.

How can I get rid of this error? I checked version of pymavlink I am using. It is 2.4.6.

Also, is there any way by which I can disable Lidar while the drone is in flight without rebooting the pixhawk?