{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Tesla.Car.Command.Software (
scheduleUpdate, cancelUpdate
) where
import Control.Monad.IO.Class (MonadIO (..))
import Tesla.Car.Command
scheduleUpdate :: MonadIO m => Int -> Car m CommandResponse
scheduleUpdate :: forall (m :: * -> *). MonadIO m => Int -> Car m CommandResponse
scheduleUpdate Int
secs = forall (m :: * -> *).
MonadIO m =>
String -> [Pair] -> Car m CommandResponse
runCmd String
"schedule_software_update" [Key
"offset_sec" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Int
secs]
mkCommand "cancelUpdate" "cancel_software_update"