From 3d0fbcf95e648f3511cfa9082c58d271fb6de963 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 11 Jun 2020 16:53:29 +0200 Subject: [PATCH] fix home-assistant and button --- configs/pepe/home-assistant.nix | 40 ++++++++++++++++++--------------- configs/pepe/syncthing.nix | 19 ++++++++-------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/configs/pepe/home-assistant.nix b/configs/pepe/home-assistant.nix index 626604d..224442d 100644 --- a/configs/pepe/home-assistant.nix +++ b/configs/pepe/home-assistant.nix @@ -85,14 +85,9 @@ in { entity_id = "input_boolean.situation_toggle"; }; condition = { - condition = "not"; - conditions = [{ - condition = { - condition = "state"; - entity_id = "input_select.scene"; - state = "outside"; - }; - }]; + condition = "template"; + value_template = + ''{{ states.input_select.scene.state != "outside" }}''; }; action = { service = "input_select.select_next"; @@ -106,17 +101,26 @@ in { entity_id = "input_boolean.situation_toggle"; }; condition = { - condition = "state"; - entity_id = "input_select.scene"; - state = "outside"; - }; - action = { - service = "input_select.select_option"; - data = { - entity_id = "input_select.scene_button"; - option = "default"; - }; + condition = "template"; + value_template = + ''{{ states.input_select.scene.state == "outside" }}''; }; + action = [ + { + service = "input_select.select_option"; + data = { + entity_id = "input_select.scene_button"; + option = "default"; + }; + } + { + service = "input_select.select_option"; + data = { + entity_id = "input_select.scene"; + option = "default"; + }; + } + ]; } { alias = "Button Scene -> Scene"; diff --git a/configs/pepe/syncthing.nix b/configs/pepe/syncthing.nix index 73d2091..1d7847c 100644 --- a/configs/pepe/syncthing.nix +++ b/configs/pepe/syncthing.nix @@ -81,15 +81,16 @@ }; }; - systemd.services."permown._media_syncthing" = { - bindsTo = [ "media.mount" ]; - after = [ "media.mount" ]; - }; - system.permown."/media/syncthing" = { - owner = "syncthing"; - group = "syncthing"; - umask = "0007"; - }; + # todo not working properly + #systemd.services."permown._media_syncthing" = { + # bindsTo = [ "media.mount" ]; + # after = [ "media.mount" ]; + #}; + #system.permown."/media/syncthing" = { + # owner = "syncthing"; + # group = "syncthing"; + # umask = "0003"; + #}; systemd.services."syncthing" = { bindsTo = [ "media.mount" ]; after = [ "media.mount" ];