diff --git a/modules/services/home-assistant.nix b/modules/services/home-assistant.nix index 99ad2ba..c2aafdc 100644 --- a/modules/services/home-assistant.nix +++ b/modules/services/home-assistant.nix @@ -79,8 +79,8 @@ in }; unit_system = lib.mkOption { type = lib.types.oneOf [ lib.types.str (lib.types.enum [ "metric" "us_customary" ]) ]; - description = "Timezone of this instance."; - example = "America/Los_Angeles"; + description = "Unit system of this instance."; + example = "metric"; }; }; }; @@ -326,6 +326,7 @@ in systemd.services.home-assistant.preStart = (let + # TODO: this probably does not work anymore onboarding = pkgs.writeText "onboarding" '' { "version": 4, diff --git a/test/services/home-assistant.nix b/test/services/home-assistant.nix index feb1dd6..97ff116 100644 --- a/test/services/home-assistant.nix +++ b/test/services/home-assistant.nix @@ -29,10 +29,10 @@ let config = { name = "Tiserbox"; - country = "My Country"; + country = "CH"; latitude = "01.0000000000"; longitude.source = pkgs.writeText "longitude" "01.0000000000"; - time_zone = "America/Los_Angeles"; + time_zone = "Europe/Zurich"; unit_system = "metric"; }; }; @@ -62,14 +62,10 @@ let "page.get_by_label(re.compile('Confirm password')).fill('adminpassword')" "page.get_by_role('button', name=re.compile('Create account')).click()" - "expect(page.get_by_text('All set')).to_be_visible()" + "expect(page.get_by_text('We found compatible devices')).to_be_visible()" "page.get_by_role('button', name=re.compile('Finish')).click()" - "page.get_by_label(re.compile('Username')).fill('admin')" - "page.get_by_label(re.compile('Password')).fill('adminpassword')" - "page.get_by_role('button', name=re.compile('Log in')).click()" - - "expect(page).to_have_title(re.compile('Overview'))" + "expect(page).to_have_title(re.compile('Overview'), timeout=15000)" ]; } ]; };