diff --git a/hosts/microserver.home.ts.hillion.co.uk/default.nix b/hosts/microserver.home.ts.hillion.co.uk/default.nix index 5157d5e..f4f6b61 100644 --- a/hosts/microserver.home.ts.hillion.co.uk/default.nix +++ b/hosts/microserver.home.ts.hillion.co.uk/default.nix @@ -34,6 +34,10 @@ }; }; + hardware = { + bluetooth.enable = true; + }; + ## Enable IP forwarding for Tailscale boot.kernel.sysctl = { "net.ipv4.ip_forward" = true; diff --git a/modules/services/homeassistant.nix b/modules/services/homeassistant.nix index 115a5e0..7d1f966 100644 --- a/modules/services/homeassistant.nix +++ b/modules/services/homeassistant.nix @@ -41,6 +41,7 @@ in psycopg2 # postgresql support ]; extraComponents = [ + "bluetooth" "default_config" "esphome" "flux" @@ -51,6 +52,7 @@ in "mqtt" "otp" "sun" + "switchbot" ]; config = { @@ -71,6 +73,9 @@ in client_email = "!secret google_assistant_service_account_client_email"; private_key = "!secret google_assistant_service_account_private_key"; }; + report_state = true; + expose_by_default = true; + exposed_domains = [ "light" ]; }; homekit = [{ filter = { @@ -78,6 +83,8 @@ in }; }]; + bluetooth = { }; + switch = [ { platform = "flux"; @@ -98,6 +105,23 @@ in } ]; + light = [ + { + platform = "template"; + lights = { + bathroom_light = { + unique_id = "87a4cbb5-e5a7-44fd-9f28-fec2d6a62538"; + value_template = "on"; + turn_on = { service = "script.noop"; }; + turn_off = { + service = "switch.turn_on"; + entity_id = "switch.bathroom_light"; + }; + }; + }; + } + ]; + sensor = [ { # Time/Date (for automations)