Runtimes and controllers

This commit is contained in:
2026-08-20 22:34:01 +03:00
parent b3aa4c4991
commit 18e1d68a4f
5 changed files with 56 additions and 17 deletions
-1
View File
@@ -42,7 +42,6 @@ newBus start = Bus
channelHassEval :: Bus -> HASSEff a -> IO a
channelHassEval bus = \case
CallService svc -> atomically $ writeTChan (busOutbound bus) svc
Pure a -> pure a
newtype CallIdGen = CallIdGen { generateCallId :: IO Int }
+1 -1
View File
@@ -98,4 +98,4 @@ encodeService callId Service{..} = object $
, "domain" .= serviceDomain
, "service" .= serviceName
, "target" .= object ["entity_id" .= serviceTarget]
] <> maybe [] (\d -> ["service_data" .= d]) serviceData
] <> maybe [] (\d -> ["data" .= d]) serviceData