diff options
author | makefu <github@syntax-fehler.de> | 2020-11-18 22:23:33 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2020-11-18 22:23:33 +0100 |
commit | 78fc347be0a0b680bd39a72ac94418d211f5d777 (patch) | |
tree | 9e3b7ccd59bb6b1422f5fdc3422e641bd055ea30 /makefu/2configs/ham/automation/firetv_restart.nix | |
parent | e04ae7a3147c731fa3eff16721253cec4dfccdbc (diff) |
ma ham: use new home-assistant merge function
Diffstat (limited to 'makefu/2configs/ham/automation/firetv_restart.nix')
-rw-r--r-- | makefu/2configs/ham/automation/firetv_restart.nix | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/makefu/2configs/ham/automation/firetv_restart.nix b/makefu/2configs/ham/automation/firetv_restart.nix index 1094d177f..9ae469872 100644 --- a/makefu/2configs/ham/automation/firetv_restart.nix +++ b/makefu/2configs/ham/automation/firetv_restart.nix @@ -7,27 +7,31 @@ let }; }; sec = seconds: { delay.seconds = seconds; }; -in [ - { - alias = "Nightly reboot of firetv"; - trigger = { - platform = "time"; - at = "03:00:00"; - }; - action = [ - (cmd "reboot") - (sec 90) # go to my music because apparently select_source does not seem to always work - (cmd "HOME") - (sec 2) - (cmd "DOWN") - (sec 2) - (cmd "DOWN") - (sec 2) - (cmd "ENTER") - (sec 4) - (cmd "RIGHT") - (sec 2) - (cmd "RIGHT") - ]; - } -] +in +{ + services.home-assistant.config.sensor = + [ + { + alias = "Nightly reboot of firetv"; + trigger = { + platform = "time"; + at = "03:00:00"; + }; + action = [ + (cmd "reboot") + (sec 90) # go to my music because apparently select_source does not seem to always work + (cmd "HOME") + (sec 2) + (cmd "DOWN") + (sec 2) + (cmd "DOWN") + (sec 2) + (cmd "ENTER") + (sec 4) + (cmd "RIGHT") + (sec 2) + (cmd "RIGHT") + ]; + } + ]; +} |