sampad/config.example.dhall

27 lines
854 B
Plaintext

let T = ./types.dhall
in { mqtt_servers.default
=
{ host = "1.2.3.4", user = Some "username", pass = Some "password" }
, layers.default
=
{ default_mapping = T.Action.Print "no mapping!"
, mappings =
let sometopic = "homeassistant/switch/something/set"
in { key_0 =
T.Mapping.Trigger
(T.Action.MQTTPub { topic = sometopic, payload = "ON" })
, key_1 =
T.Mapping.Trigger
(T.Action.MQTTPub { topic = sometopic, payload = "OFF" })
, key_2 =
T.Mapping.TriggerMulti
[ T.Action.Print "Doing a thing"
, T.Action.MQTTPub
{ topic = "thing/foo/bar", payload = "boop" }
]
}
}
}