Ikea buttons

This commit is contained in:
2026-08-20 23:51:35 +03:00
parent 4d689be6ea
commit 0b29b081e2
3 changed files with 3 additions and 2 deletions
+1 -2
View File
@@ -6,10 +6,9 @@ import HomeAssistant.Controller
import qualified Data.Text as T import qualified Data.Text as T
import AFRP (Event (..), (>>|), toEvent, lMerge) import AFRP (Event (..), (>>|), toEvent, lMerge)
import Data.Aeson (Value, object, (.=)) import Data.Aeson (Value, object, (.=))
import Control.Arrow ((>>>), returnA, arr, ArrowChoice (..), Arrow (..)) import Control.Arrow ((>>>), returnA, arr, Arrow (..))
import Control.Lens ((^?), to, traversed) import Control.Lens ((^?), to, traversed)
import Data.Aeson.Lens (key, _String) import Data.Aeson.Lens (key, _String)
import qualified Data.Text.Lens as TL
+1
View File
@@ -72,3 +72,4 @@ dryRunHassEval gen = \case
CallService x -> do CallService x -> do
callId <- generateCallId gen callId <- generateCallId gen
print (callId, x) print (callId, x)
Debug x -> print x
+1
View File
@@ -42,6 +42,7 @@ newBus start = Bus
channelHassEval :: Bus -> HASSEff a -> IO a channelHassEval :: Bus -> HASSEff a -> IO a
channelHassEval bus = \case channelHassEval bus = \case
CallService svc -> atomically $ writeTChan (busOutbound bus) svc CallService svc -> atomically $ writeTChan (busOutbound bus) svc
Debug x -> print x
newtype CallIdGen = CallIdGen { generateCallId :: IO Int } newtype CallIdGen = CallIdGen { generateCallId :: IO Int }