diff options
author | lassulus <lassulus@lassul.us> | 2021-08-31 19:16:11 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-08-31 19:16:11 +0200 |
commit | 8104c7412081d8ae3e372cf160bf3c6109a6a4e7 (patch) | |
tree | ac4c74514a8fbdcb682f1f1e22ebdf3376c0e1fd /makefu/2configs/home/ham/automation/ladestecker_timer.nix | |
parent | f1fd0f15cd506cd263e43d94c6bcf933b693d0a2 (diff) | |
parent | 6e9910aa65b63d7bda3434c8089f6904adb8e45c (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/home/ham/automation/ladestecker_timer.nix')
-rw-r--r-- | makefu/2configs/home/ham/automation/ladestecker_timer.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/makefu/2configs/home/ham/automation/ladestecker_timer.nix b/makefu/2configs/home/ham/automation/ladestecker_timer.nix new file mode 100644 index 000000000..8e877129c --- /dev/null +++ b/makefu/2configs/home/ham/automation/ladestecker_timer.nix @@ -0,0 +1,24 @@ +let + relay = "switch.terrasse_plug_relay"; + timeout = "300"; +in { + services.home-assistant.config.automation = [ + { alias = "Always turn off Charging station after ${toString (timeout)}m"; + trigger = [ + { + platform = "state"; + entity_id = relay; + to = "on"; + for.minutes = timeout; + } + ]; + action = + [ + { + service = "homeassistant.turn_off"; + entity_id = [ relay ]; + } + ]; + } + ]; +} |