Start adding custom components, currently not working
This commit is contained in:
parent
45e12d2906
commit
a1dbb153bc
|
@ -5,7 +5,7 @@
|
|||
./services/caddy.nix
|
||||
./services/forgejo.nix
|
||||
./services/grafana.nix
|
||||
./services/home-assistant.nix
|
||||
./services/home-assistant/default.nix
|
||||
./services/nix-serve.nix
|
||||
./services/sshd.nix
|
||||
./services/syncthing.nix
|
||||
|
|
18
system/services/home-assistant/customComponents/myenergi.nix
Normal file
18
system/services/home-assistant/customComponents/myenergi.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
fetchFromGitHub,
|
||||
buildHomeAssistantComponent,
|
||||
pymyenergi,
|
||||
}:
|
||||
buildHomeAssistantComponent rec {
|
||||
owner = "cjne";
|
||||
domain = "myenergi";
|
||||
version = "0.0.28";
|
||||
src = fetchFromGitHub {
|
||||
owner = "cjne";
|
||||
repo = "ha-myenergi";
|
||||
rev = version;
|
||||
hash = "sha256-Iu9HqGX3UZXSzsZR0jTSYNOgPPqxWryyRNxw6Fxj2qU=";
|
||||
};
|
||||
dependencies = [ pymyenergi ];
|
||||
ignoreVersionRequirement = [ "pymyenergi" ];
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
httpx,
|
||||
setuptools,
|
||||
pycognito,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pymyenergi";
|
||||
version = "0.2.1";
|
||||
pyproject = false;
|
||||
disabled = pythonOlder "3.6";
|
||||
src = fetchFromGitHub {
|
||||
owner = "cjne";
|
||||
repo = "pymyenergi";
|
||||
tag = version;
|
||||
hash = "sha256-yfAc+phs8qLiYyM5j5LGDtA4fIT5LrHF3cNIhYjQemI=";
|
||||
};
|
||||
build-system = [ setuptools ];
|
||||
dependencies = [
|
||||
httpx
|
||||
pycognito
|
||||
];
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
pythonImportsCheck = [ "pymyenergi" ];
|
||||
}
|
|
@ -21,9 +21,14 @@
|
|||
"prusalink"
|
||||
"sonos"
|
||||
"syncthing"
|
||||
"tado"
|
||||
"tplink_tapo"
|
||||
];
|
||||
customComponents = with pkgs.home-assistant-custom-components; [ dirigera_platform ];
|
||||
customComponents = with pkgs.home-assistant-custom-components; [
|
||||
(dirigera_platform.override {
|
||||
dirigera = (pkgs.python312Packages.dirigera.overrideAttrs (final: prev: { doCheck = false; }));
|
||||
})
|
||||
];
|
||||
config = {
|
||||
# Includes dependencies for a basic setup
|
||||
# https://www.home-assistant.io/integrations/default_config/
|
||||
|
@ -41,7 +46,7 @@
|
|||
};
|
||||
homeassistant = {
|
||||
inherit (config.location) latitude longitude;
|
||||
media_dirs.music = "/var/lib/syncthing/Music";
|
||||
# media_dirs.music = "/var/lib/syncthing/Music";
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Reference in a new issue