diff --git a/systems/LoutreOS/hardware-configuration.nix b/systems/LoutreOS/hardware-configuration.nix index 7bfc7fe62..1dfe4fbcb 100644 --- a/systems/LoutreOS/hardware-configuration.nix +++ b/systems/LoutreOS/hardware-configuration.nix @@ -157,6 +157,11 @@ fsType = "zfs"; }; + fileSystems."/var/lib/hass" = + { device = "loutrepool/var/hass"; + fsType = "zfs"; + }; + swapDevices = [ { diff --git a/systems/LoutreOS/services.nix b/systems/LoutreOS/services.nix index 28937b5c8..171056bc3 100644 --- a/systems/LoutreOS/services.nix +++ b/systems/LoutreOS/services.nix @@ -246,7 +246,10 @@ in }; influxdb = null; config = null; - frontend = null; + frontend.themes = "!include ${pkgs.fetchurl { + url = "https://raw.githubusercontent.com/bbbenji/synthwave-hass/0.3.3.1/themes/synthwave.yaml"; + sha256 = "1n2yhk98cf778z7fdl5bswljhj45nv6bld191rxw7q6ckp235q4h"; + }}"; history = null; logbook = null; map = null; @@ -321,6 +324,12 @@ in broadcast_address = "10.30.255.255"; } ]; + device_tracker = [ + { + platform = "ping"; + hosts = { telephone_paul = "10.30.50.2"; }; + } + ]; scene = [ { name = "Movie"; @@ -399,10 +408,20 @@ in entity_id = "person.paul"; state = "home"; } + # Sun below max elevation { condition = "template"; value_template = "{{ state_attr('sun.sun', 'elevation') < ${toString min_sun_elevation} }}"; } + # All lights off + { + condition = "template"; + value_template = '' + {% set domain = 'light' %} + {% set state = 'off' %} + {{ states[domain] | count == states[domain] | selectattr('state','eq', state) | list | count }} + ''; + } ]; action = { scene = "scene.home"; @@ -421,7 +440,7 @@ in entity_id = "all"; } { - service = "media_player.media_pause"; + service = "media_player.turn_off"; entity_id = "all"; } ];