Start adding custom components, currently not working

This commit is contained in:
Evie Litherland-Smith 2025-02-16 11:49:38 +00:00
parent 45e12d2906
commit a1dbb153bc
4 changed files with 55 additions and 3 deletions

View file

@ -5,7 +5,7 @@
./services/caddy.nix ./services/caddy.nix
./services/forgejo.nix ./services/forgejo.nix
./services/grafana.nix ./services/grafana.nix
./services/home-assistant.nix ./services/home-assistant/default.nix
./services/nix-serve.nix ./services/nix-serve.nix
./services/sshd.nix ./services/sshd.nix
./services/syncthing.nix ./services/syncthing.nix

View 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" ];
}

View file

@ -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" ];
}

View file

@ -21,9 +21,14 @@
"prusalink" "prusalink"
"sonos" "sonos"
"syncthing" "syncthing"
"tado"
"tplink_tapo" "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 = { config = {
# Includes dependencies for a basic setup # Includes dependencies for a basic setup
# https://www.home-assistant.io/integrations/default_config/ # https://www.home-assistant.io/integrations/default_config/
@ -41,7 +46,7 @@
}; };
homeassistant = { homeassistant = {
inherit (config.location) latitude longitude; inherit (config.location) latitude longitude;
media_dirs.music = "/var/lib/syncthing/Music"; # media_dirs.music = "/var/lib/syncthing/Music";
}; };
}; };
}; };