summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-02-19 16:38:25 +0100
committermakefu <github@syntax-fehler.de>2020-02-19 16:38:25 +0100
commita62f71b00bdb4028595d7edae0e2a25942ad1e56 (patch)
treecab72780c7aaeb90eaf7a8956c2dbf102c3e1a7a /krebs/2configs/shack
parent72d34fccb48e5a1c303db72e708f434225306fc9 (diff)
shack/glados/lib: add rollo config
Diffstat (limited to 'krebs/2configs/shack')
-rw-r--r--krebs/2configs/shack/glados/lib/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/krebs/2configs/shack/glados/lib/default.nix b/krebs/2configs/shack/glados/lib/default.nix
index eb0528a0..6ab1edf8 100644
--- a/krebs/2configs/shack/glados/lib/default.nix
+++ b/krebs/2configs/shack/glados/lib/default.nix
@@ -72,6 +72,17 @@ in
payload_available = "online";
payload_not_available = "offline";
};
+ rollo = {host, topic ? "rollo" }:
+ {
+ optimistic = true;
+ platform = "mqtt";
+ name = "${host} Rollo";
+ state_topic = "${prefix}/${host}/sensor/${topic}/state";
+ command_topic = "${prefix}/${host}/sensor/${topic}/command";
+ availability_topic = "${prefix}/${host}/status";
+ position_topic = "${prefix}/${host}/cover/${topic}/position/state";
+ set_position_topic = "${prefix}/${host}/cover/${topic}/position/command";
+ };
# copied from "homeassistant/light/fablab_led/led_ring/config"
led = {host, topic ? "led", name ? host}:
{ # name: fablab_led
@@ -100,6 +111,37 @@ in
payload_not_available = "offline";
qos = 1;
};
+ monoled = {host, topic ? "blue_led", name ? host "MonoLED ${host}"}:
+ {
+ platform = "mqtt";
+ inherit name;
+ schema = "json";
+ brightness = true;
+ effect = true;
+ effect_list = [ # TODO: may be different
+ "Strobe"
+ "Twinkle"
+ "None"
+ ];
+ state_topic = "${prefix}/${host}/light/${topic}/state";
+ command_topic = "${prefix}/${host}/light/${topic}/command";
+ availability_topic = "${prefix}/${host}/status";
+ };
+ btn = {host, topic ? "button", name ? "${host} ${topic}"}: #binary_sensor
+ {
+ platform = "mqtt";
+ name = "${host} Button";
+ state_topic = "${prefix}/${host}/binary_sensor/${topic}/state";
+ availability_topic = "${prefix}/${host}/status";
+ };
+ relay = {host, name ? "${host} ${topic}", topic ? "relay" }: #switch
+ {
+ inherit name;
+ platform = "mqtt";
+ state_topic = "${prefix}/${host}/switch/${topic}/state";
+ command_topic = "${prefix}/${host}/switch/${topic}/command";
+ availability_topic = "${prefix}/${host}/status";
+ };
# Feinstaub
dust_25m = { host, name ? "${host} < 2.5µm", topic ? "particulate_matter_25m_concentration" }:
{