 
   def handle_cast(:trigger, %{pin_binding: %{special_action: "emergency_unlock"} = pin_binding} = state) do
     FarmbotCore.Logger.info(1, "Pinbinding triggered: #{pin_binding}")
-    ref =
+    {:ok, ref} =
       AST.Factory.new()
       |> AST.Factory.rpc_request("pin_binding.#{pin_binding.pin_num}")
       |> AST.Factory.emergency_unlock()


  def handle_cast(:trigger, %{pin_binding: %{special_action: "reboot"} = pin_binding} = state) do
    FarmbotCore.Logger.info(1, "Pinbinding triggered: #{pin_binding}")
    ref =
      AST.Factory.new()
      |> AST.Factory.rpc_request("pin_binding.#{pin_binding.pin_num}")
      |> AST.Factory.reboot()


  def handle_cast(:trigger, %{pin_binding: %{special_action: "sync"} = pin_binding} = state) do
    FarmbotCore.Logger.info(1, "Pinbinding triggered: #{pin_binding}")
    {:ok, ref} =
      AST.Factory.new()
      |> AST.Factory.rpc_request("pin_binding.#{pin_binding.pin_num}")
      |> AST.Factory.sync()
