Skip to content

Commit

Permalink
home-assistant: support watergate component (NixOS#372401)
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt authored Jan 9, 2025
2 parents 3d8e857 + fd03a23 commit 430a3cd
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
44 changes: 44 additions & 0 deletions pkgs/development/python-modules/watergate-local-api/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
aiohttp,
aioresponses,
buildPythonPackage,
fetchFromGitHub,
lib,
pytest-asyncio,
pytestCheckHook,
setuptools,
}:

buildPythonPackage rec {
pname = "watergate-local-api";
version = "2024.4.1";
pyproject = true;

src = fetchFromGitHub {
owner = "watergate-ai";
repo = "watergate-local-api-python";
tag = version;
hash = "sha256-zEbujtXTXjRRzpNdowh7xjBvCxwp7Z1QYRm6ZM8rFR8=";
};

build-system = [ setuptools ];

dependencies = [
aiohttp
];

pythonImportsCheck = [ "watergate_local_api" ];

nativeCheckInputs = [
aioresponses
pytest-asyncio
pytestCheckHook
];

meta = {
description = "Python package to interact with the Watergate Local API";
homepage = "https://github.com/watergate-ai/watergate-local-api-python";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ dotlambda ];
};
}
4 changes: 3 additions & 1 deletion pkgs/servers/home-assistant/component-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6129,7 +6129,8 @@
];
"watergate" =
ps: with ps; [
]; # missing inputs: watergate-local-api
watergate-local-api
];
"watson_iot" =
ps: with ps; [
]; # missing inputs: ibmiotf
Expand Down Expand Up @@ -7348,6 +7349,7 @@
"wallbox"
"waqi"
"water_heater"
"watergate"
"watttime"
"waze_travel_time"
"weather"
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17922,6 +17922,8 @@ self: super: with self; {

waterfurnace = callPackage ../development/python-modules/waterfurnace { };

watergate-local-api = callPackage ../development/python-modules/watergate-local-api { };

watermark = callPackage ../development/python-modules/watermark { };

wavedrom = callPackage ../development/python-modules/wavedrom { };
Expand Down

0 comments on commit 430a3cd

Please sign in to comment.