From 78f95bfcb3190a4d424cde72af83d606e04acefc Mon Sep 17 00:00:00 2001 From: arcnmx Date: Fri, 7 Oct 2022 10:06:24 -0700 Subject: [PATCH] fix: se presence topic you can't just put `!secret` anywhere in a string --- nixos/systems/tewi/home-assistant.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/systems/tewi/home-assistant.nix b/nixos/systems/tewi/home-assistant.nix index c9c28e84..bd585ab1 100644 --- a/nixos/systems/tewi/home-assistant.nix +++ b/nixos/systems/tewi/home-assistant.nix @@ -56,11 +56,12 @@ in { secrets.files.home-assistant-secrets = { - text = builtins.toJSON { + text = builtins.toJSON rec { latitude = tf.variables.latitude.ref; longitude = tf.variables.longitude.ref; elevation = tf.variables.elevation.ref; iphone-se-irk = tf.variables.iphone-se-irk.ref; + iphone-se-irk-topic = "espresense/devices/${iphone-se-irk}"; mpd-shanghai-password = tf.variables.mpd-shanghai-password.ref; }; owner = "hass"; @@ -262,6 +263,7 @@ in { in [ (mkESPresenceBeacon { device_id = "!secret iphone-se-irk"; + state_topic = "!secret iphone-se-irk-topic"; name = "iPhone SE"; timeout = 2; away_timeout = 120;