Change:
Nixos build error when using a MQTT sensor, following . being the channel. The corresponding line seems to have been removed in : which is the commit for the update to . Maybe the code has changed and the python script no longer recognises sensors correctly ? system: host os: multi-user?: sandbox: version: channels(root): nixpkgs:
The configuration you listed above does not yield an evaluation error. I have verified that by building it myself. You must have specified somewhere else.
I don't have any other mention of in my config, although I have also configured an external mqtt brocker with which might change the evaluation. I can confirm that when I remove the sensor config, the evaluation error goes away, which is why I didn't think I needed to include the brocker config. Those are the only mention of in my config I promise! Still it's strange that the line was removed from no ?
I've just noticed now that I have forgotten in my config... Here is the actual pieces of relevant config:
That's the default. No need to include it. After all, I was able to reproduce your error by building NixOS from the stable channel. My bad. It's caused by the following line: which will use the from the stable package. However, if I set I get which I still have to investigate.
I really have no idea what's going on. The way I test this is by having a file with the following content: and a checkout of the branch with the following diff at : When building the configuration I get What's strange is that there is no error when points to the branch with the diff applied. Maybe or have a clue.
I am happy you could reproduce this! Still, I don't see any line for in the (but I see it in the ), which I think it will lead to problems when it will be merged, no ? What I still find strange, is that the referred file in my original error is from ... Is this making any sense ?
Yes, this makes sense: The module is taking the list of from the stable channel and passing those used in your config to the package from the unstable channel, which obviously can't find the component since it's no longer in .
Ok, thank you for your explanations, I understand where the error comes from now ! I did some digging around to know why the line has disappeared from the with the update. This is what I found out: on the home-assistant repository, the code for the mqtt sensor was moved from the to between and this means that the is now in the When I define a mqtt sensor in my nixos config, will the nixos module be able to do the conversion from to (I don't fully understand the code in the nixos module, especially the code) ?
Not yet. I will implement that once I was able to solve the stack overflow issue.
The problem should be solved once you upgrade your system since is now in the channel. Can you please try again?
I can confirm that I don't have the build error anymore, thank you ! However, the home-assistant environment is missing component dependencies. Same as stated previously, home-assistant code has been refactored, but config is the same, which means that dependencies are not found. For example, I have declared in config, but dependencies are at the key.
Adjusting the code for is on my TODO list. For now, please override the package's .
Ok, at the moment, I am using manual config because I am testing home-assistant, using and the automation editor, so I have manually set the . Do you think we could add a package (something like ) which would have all possible dependencies (the idea being that I would also be built by hydra) - a little like the docker/distro image that distributes ?
Sure, no problem. However, I suscpect that will often not build due to some Python packages not building. Do you want to make a PR or should I do it?
I can surely try, but I am not sure how I should proceed : I define a new option for package that populates to all packages referenced in should I call the package with all packages referenced in (in a new file next to ), and call it in a new in . Which option do you think is best ?
I guess the first option comes close to the best one. However, please don't use for that but directly add the packages to . Maybe we could also add a few lines to to add a list of all packages to so that we don't go through all components to generate that list.

Discussion:
${pkgs.remarshal}/bin/json2yaml -i ${lovelaceConfigJSON} -o $out ''; <del> availableComponents = pkgs.home-assistant.availableComponents; </del> <ins> availableComponents = cfg.package.availableComponents; </ins> # Given component "parentConfig.platform", returns whether config.parentConfig # is a list containing a set with set.platform == "platform".