!QhvgabMQzwEQeWehhZ:lossy.network

NixOS Home Automation

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

Load older messages


SenderMessageTime
17 Dec 2024
@hexa:lossy.network@hexa:lossy.networkit didn't work out too well for local files as I had hoped03:16:38
@hexa:lossy.network@hexa:lossy.networksomeone asked for it, so I PRed it03:16:47
@hexa:lossy.network@hexa:lossy.networkand here we are03:16:50
@hexa:lossy.network@hexa:lossy.networkfor home-assistant we ended up making the tests top-level attributes, so that dependency bumps would run them03:22:43
@hexa:lossy.network@hexa:lossy.networkbut music-assistant hardly has any tests for specific providers, just filesystem and jellyfin03:23:02
@hexa:lossy.network@hexa:lossy.networkI'll look into how to best patch out the behavior tomorrow03:24:08
@hexa:lossy.network@hexa:lossy.networkimage.png
Download image.png
03:41:10
@hexa:lossy.network@hexa:lossy.network
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.network@hexa:lossy.networkso 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.network@hexa:lossy.networkhttps://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.network@hexa:lossy.networkno 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.network@hexa:lossy.networkon 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.network@hexa:lossy.networkyes00:02:50
@netpleb:matrix.orgnetpleb

ok, yeah the only thing I had in there so far was this:

    config = {
      # Includes dependencies for a basic setup
      # https://www.home-assistant.io/integrations/default_config/
      default_config = {};
      
      # apparently the following line is necessary to get the GUI to work?
      # see https://www.home-assistant.io/docs/automation/yaml/
      automation = "!include automations.yaml";
    };

which is not quite the same as what the wiki says. I'll try the wiki recommendation. Thanks hexa !

00:03:59
@netpleb:matrix.orgnetpleb That fixed it! Not sure if it is normal but I had to manually make scenes.yaml (just as an empty file initially), otherwise it choked and went into recovery mode. 00:21:13
@erahhal:matrix.homefree.hosterahhal joined the room.01:25:44
@bbigras:matrix.orgbbigras left the room.01:43:21
@rtjure:matrix.orgrtjure joined the room.19:57:20
@hexa:lossy.network@hexa:lossy.networkhttps://www.home-assistant.io/voice-pe/20:13:40
@k900:0upti.meK900Sheeeh20:19:21

Show newer messages


Back to Room ListRoom Version: 6