| 8 Feb 2025 |
macaroniskengz | Has somebody installed zha-toolkit? | 13:15:42 |
macaroniskengz | And is there a better way to add a new custom component than to switch whole Nixpkgs to a custom fork? | 13:53:01 |
macaroniskengz | I just created this:
{ lib, stdenv, pkgs, fetchFromGitHub, buildHomeAssistantComponent }:
let repoName = "zha-toolkit"; in buildHomeAssistantComponent
rec{
owner = "mdeweerd";
domain = "zha_toolkit";
version = "1.1.25";
src = fetchFromGitHub {
inherit owner;
repo = repoName;
tag = "v${version}";
hash = "sha256-e80zjBuzz0W9RkY2BEN4LVXp1h/KiYmyPXmdyaQSctU=";
};
dependencies = with pkgs.python312Packages; [
aiofiles
pytz
];
meta = with lib; {
changelog = "https://github.com/${owner}/${repoName}/releases/tag/v${version}";
description = "Home Assistant integration framework for (garbage collection) schedules";
homepage = "https://github.com/${owner}/${repoName}/";
maintainers = with maintainers; [ jamiemagee ];
license = licenses.mit;
};
}
and imported it with
customComponents = [
(pkgs.callPackage ./zha-toolkit.nix { })
];
| 14:45:28 |
macaroniskengz | The installation guide of zha-toolkit specifies that the configuration.yaml needs to contain zha_toolkit: . How can I achieve this? | 14:46:09 |
@hexa:lossy.network | services.home-assistant.config.zha_toolkit = {}; | 14:53:42 |
@hexa:lossy.network | * services.home-assistant.config.zha\_toolkit = {};
| 14:53:45 |
@hexa:lossy.network | * services.home-assistant.config.zha_toolkit = {};
| 14:53:51 |
dotlambda | In reply to @macaroniskengz:matrix.org
I just created this:
{ lib, stdenv, pkgs, fetchFromGitHub, buildHomeAssistantComponent }:
let repoName = "zha-toolkit"; in buildHomeAssistantComponent
rec{
owner = "mdeweerd";
domain = "zha_toolkit";
version = "1.1.25";
src = fetchFromGitHub {
inherit owner;
repo = repoName;
tag = "v${version}";
hash = "sha256-e80zjBuzz0W9RkY2BEN4LVXp1h/KiYmyPXmdyaQSctU=";
};
dependencies = with pkgs.python312Packages; [
aiofiles
pytz
];
meta = with lib; {
changelog = "https://github.com/${owner}/${repoName}/releases/tag/v${version}";
description = "Home Assistant integration framework for (garbage collection) schedules";
homepage = "https://github.com/${owner}/${repoName}/";
maintainers = with maintainers; [ jamiemagee ];
license = licenses.mit;
};
}
and imported it with
customComponents = [
(pkgs.callPackage ./zha-toolkit.nix { })
];
You should add it to Nixpkgs ;-) | 17:20:54 |
mattleon | Does anyone here have light switches that work well with declarative configuration in hass?
I currently have tuya wifi switches that are declaratively configured, but I'm anticipating moving and getting new light switches. Would prefer to configure via yaml. | 17:44:21 |
| 9 Feb 2025 |
| ohchase joined the room. | 13:35:24 |
mfed3 | Does anyone know how to properly set "media_dirs" in NixOS declarative? I just want to use a local relative folder in wherever nixos is storing my home-assistant in a folder called media.
media_dirs = {
media = "/media";
}
Does this look right?
| 17:46:09 |
mfed3 | I don't want it to require any extra permissions or absolute file paths, just going to throw some snapshots in there for camera notifications | 17:46:48 |
@hexa:lossy.network | https://www.home-assistant.io/integrations/media_source/#using-custom-or-additional-media-folders | 17:47:40 |
@hexa:lossy.network | and you possibly need to also set allowlist_external_dirs | 17:48:02 |
@hexa:lossy.network | https://www.home-assistant.io/integrations/homeassistant/#allowlist_external_dirs | 17:48:32 |
mfed3 | Think this will work?
homeassistant = {
media_dirs = {
local = "/media";
};
allowlist_external_dirs = [ "/media" ];
};
| 17:52:05 |
mfed3 | I am always unsure about converting yaml to nix in knowing if things are variables or strings like "local" = vs local = | 17:52:44 |
@hexa:lossy.network | not with that indent 😄 | 17:53:17 |
@hexa:lossy.network | * not with that indent 😄 | 17:53:31 |
@hexa:lossy.network | nothing in home-assistant yaml is a variable | 17:53:52 |
@hexa:lossy.network | the values you pass can be nix vars | 17:54:09 |
mfed3 | LOL yea don't know how that spacing happened copying and pasting in | 17:54:45 |
mfed3 | So I realize I was explaining incorrectly, previously, what I'm actually looking to do is assign medai_dirs to use a relative path inside of my NixOS home-assistant directory, not an external directory. I think allowlist is for the opposite | 18:36:20 |
mfed3 | Instead of an absolute path is there an equivalent way to say
allowlist_external_dirs = [ "/var/lib/home-assistant/media" ];
with nixos referencing just an internal folder in the installation?
| 19:02:15 |
@hexa:lossy.network | ${config.services.home-assistant.configDir}/media | 19:03:39 |
mfed3 | Thanks! | 19:35:27 |
@hexa:lossy.network | Bisecting: 2 revisions left to test after this (roughly 2 steps)
[e4e6c25166f739b71b2f9c6a9248441f407c06e9] x265: 3.6 -> 4.1 (#360117)
| 19:42:57 |
@hexa:lossy.network | the picture is getting clearer | 19:43:06 |
@hexa:lossy.network | Bisecting: 2 revisions left to test after this (roughly 1 step)
no[cd2a5352360f70a2ddeb5cf1ab617efb3ea96f02] x265: 3.6 -> 4.1
| 19:43:43 |
@hexa:lossy.network | lmao | 19:43:50 |