Split Controller.hs into vertical submodules behind umbrella re-export
This commit is contained in:
1 parent
9e00aeb6a2
commit
adce7c8427
13 files changed
+444
-341
No files matched your search
@@ -0,0 +1,14 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
module HomeAssistant.Controller.Switch (switchService) where
|
||||
|
||||
import Data.Bool (bool)
|
||||
import HomeAssistant.Controller.Service (Service (..), Target)
|
||||
|
||||
switchService :: [Target] -> Bool -> Service
|
||||
switchService targets b = Service
|
||||
{ serviceDomain="switch"
|
||||
, serviceName= bool "turn_off" "turn_on" b
|
||||
, serviceData=Nothing
|
||||
, serviceTarget=targets
|
||||
}
|
||||
Reference in new issue
Block a user