 
   def handle_info({Nerves.WpaSupplicant, :"CTRL-EVENT-NETWORK-NOT-FOUND", _}, %{not_found_timer: nil} = state) do
     first_boot = ConfigStorage.get_config_value(:bool, "settings", "first_boot")
-    delay_timer = ConfigStorage.get_config_value(:float, "settings", "network_not_found_timer")
+    # stored in minutes
+    delay_timer = (ConfigStorage.get_config_value(:float, "settings", "network_not_found_timer") || 1) *  60_000
     cond do
       first_boot ->
         Logger.error 1, "Network not found"

      delay_timer > 0 ->
        Logger.warn 1, "Network not found. Starting timer."
        timer = Process.send_after(self(), :network_not_found_timer, round(delay_timer))
        {:noreply, %{state | not_found_timer: timer}}
      is_nil(delay_timer) ->
        Logger.error 1, "Network not found"
        Farmbot.System.factory_reset("WIFI Authentication failed. (network not found)")

  end

  def handle_info({Nerves.WpaSupplicant, :"CTRL-EVENT-NETWORK-NOT-FOUND"}, state) do
    {:noreply, %{state | connected: false}}
  end

  def handle_info(:network_not_found_timer, state) do
    if state.connected do
      Logger.warn 1, "Not resetting because network is connected."
      {:noreply, %{state | not_found_timer: nil}}
    else
      Logger.error 1, "Network not found"
