!QhvgabMQzwEQeWehhZ:lossy.network

NixOS Home Automation

421 Members
Declarative Home Automation and other Sidequests | https://wiki.nixos.org/wiki/Home_Assistant117 Servers

Load older messages


SenderMessageTime
17 Dec 2024
@hexa:lossy.networkhexaso basically all pins are outdated 🥳00:22:21
@hexa:lossy.networkhexa * so basically all pins are off 🥳00:23:07
@hexa:lossy.networkhexaso many problems to resolve and only so much time in a day00:23:42
@hexa:lossy.networkhexaI think we should relax the check in mass and depend only fail on too old versions00:27:17
@hexa:lossy.networkhexa * I think we should relax the check in mass and only fail on too old versions00:29:19
@mjm:midna.devmjmi have this patch for music-assistant in my config: https://git.midna.dev/mjm/nix-config/-/blob/main/packages/music-assistant/ma-no-install.patch?ref_type=heads felt a little too gross for me to want to send to nixpkgs but i wasn't sure a better way03:08:13
@hexa:lossy.networkhexathe problem is … i started packaging it because I was curious03:16:23
@hexa:lossy.networkhexait didn't work out too well for local files as I had hoped03:16:38
@hexa:lossy.networkhexasomeone asked for it, so I PRed it03:16:47
@hexa:lossy.networkhexaand here we are03:16:50
@hexa:lossy.networkhexafor home-assistant we ended up making the tests top-level attributes, so that dependency bumps would run them03:22:43
@hexa:lossy.networkhexabut music-assistant hardly has any tests for specific providers, just filesystem and jellyfin03:23:02
@hexa:lossy.networkhexaI'll look into how to best patch out the behavior tomorrow03:24:08
@hexa:lossy.networkhexaimage.png
Download image.png
03:41:10
@hexa:lossy.networkhexa
diff --git a/music_assistant/server/helpers/util.py b/music_assistant/server/helpers/util.py
index 3d342b73..a395fb46 100644
--- a/music_assistant/server/helpers/util.py
+++ b/music_assistant/server/helpers/util.py
@@ -117,30 +117,11 @@ async def load_provider_module(domain: str, requirements: list[str]) -> Provider
     def _get_provider_module(domain: str) -> ProviderModuleType:
         return importlib.import_module(f".{domain}", "music_assistant.server.providers")
 
-    # ensure module requirements are met
-    for requirement in requirements:
-        if "==" not in requirement:
-            # we should really get rid of unpinned requirements
-            continue
-        package_name, version = requirement.split("==", 1)
-        installed_version = await get_package_version(package_name)
-        if installed_version == "0.0.0":
-            # ignore editable installs
-            continue
-        if installed_version != version:
-            await install_package(requirement)
-
     # try to load the module
     try:
         return await asyncio.to_thread(_get_provider_module, domain)
     except ImportError:
-        # (re)install ALL requirements
-        for requirement in requirements:
-            await install_package(requirement)
-    # try loading the provider again to be safe
-    # this will fail if something else is wrong (as it should)
-    return await asyncio.to_thread(_get_provider_module, domain)
-
+        raise RuntimeError(f"Missing dependencies for provider {domain}.")
 
 def create_tempfile():
     """Return a (named) temporary file."""
03:41:46
@hexa:lossy.networkhexaso we even get a nice toast 😛03:41:51
@mjm:midna.devmjmyeah that's a little better than what i did :D04:57:08
@mjm:midna.devmjmit was annoying because it seemed like that code was changing a lot when i was trying to make the patch. i was worried it would be hard to maintain but i haven't had to change it so far04:57:43
@hexa:lossy.networkhexahttps://www.home-assistant.io/blog/2024/12/16/community-survey-2024/14:03:57
18 Dec 2024
@spacekitteh:matrix.orgspacekittehoh hell yeah, i got the openthread border router building and working with the web frontend finally :D03:32:56
@spacekitteh:matrix.orgspacekittehlmao it's like they know03:35:02
@spacekitteh:matrix.orgspacekittehimage.png
Download image.png
03:35:06
@spacekitteh:matrix.orgspacekitteh i guess i should have read the blog post, they explicitly mention neurodivergency shrugs 03:39:08
@spacekitteh:matrix.orgspacekittehok, a few more tweaks and i think i'll be ready to make a PR for my openthread border router module :305:25:58
@netpleb:matrix.orgnetpleb I am trying to get confirmable notifications working. I have regular notifications working just fine. Do I need to do anything special to enable saving of scripts? I seem to be able to "create" and "save" a script from the confirmable notification blueprint, but then the script does not appear anywhere for me to use. It's like the save button did nothing. Any idea hexa ? 23:44:11
@hexa:lossy.networkhexano idea23:53:44
@netpleb:matrix.orgnetplebI mean, as far as you know, we should still be able to use the home assistant web app gui to create these scripts, right? That ability is not lost because we are doing it on nixos, right?23:57:01
19 Dec 2024
@hexa:lossy.networkhexaon second thought, there is a wiki section on that00:00:07
@netpleb:matrix.orgnetpleb

Ah! I see that now. You are talking about this?

Automations, Scenes, and Scripts from the UI

These can be created from the user interface, but the files generated from it need to be included in your configuration.

{
  services.home-assistant.config = {
    "automation ui" = "!include automations.yaml";
    "scene ui" = "!include scenes.yaml";
    "script ui" = "!include scripts.yaml";
  };
};
00:02:22
@hexa:lossy.networkhexayes00:02:50

Show newer messages


Back to Room ListRoom Version: 6