diff options
Diffstat (limited to 'makefu/2configs/ham/automation')
-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") + ]; + } + ]; +} |