Skip to content

Commit

Permalink
Merge pull request NixOS#286840 from dotlambda/bluecurrent-api-init
Browse files Browse the repository at this point in the history
home-assistant: support blue_current component
  • Loading branch information
mweinelt authored Feb 7, 2024
2 parents e4da21f + b39d11c commit 654ff63
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
54 changes: 54 additions & 0 deletions pkgs/development/python-modules/bluecurrent-api/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, pythonRelaxDepsHook
, setuptools
, pytz
, websockets
, pytest-asyncio
, pytest-mock
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "bluecurrent-api";
version = "1.0.6";
pyproject = true;

disabled = pythonOlder "3.9";

src = fetchPypi {
inherit pname version;
hash = "sha256-XHVdtkiG0ff/OY8g+W5iur7OAyhhk1UGA+XUfB2L8/o=";
};

nativeBuildInputs = [
pythonRelaxDepsHook
setuptools
];

pythonRemoveDeps = [
"asyncio"
];

propagatedBuildInputs = [
pytz
websockets
];

pythonImportsCheck = [ "bluecurrent_api" ];

nativeCheckInputs = [
pytest-asyncio
pytest-mock
pytestCheckHook
];

meta = {
description = "Wrapper for the Blue Current websocket api";
homepage = "https://github.com/bluecurrent/HomeAssistantAPI";
license = lib.licenses.mit;
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 @@ -420,7 +420,8 @@
"bloomsky" = ps: with ps; [
];
"blue_current" = ps: with ps; [
]; # missing inputs: bluecurrent-api
bluecurrent-api
];
"bluemaestro" = ps: with ps; [
aioesphomeapi
aiohttp-cors
Expand Down Expand Up @@ -5786,6 +5787,7 @@
"blackbird"
"blebox"
"blink"
"blue_current"
"bluemaestro"
"blueprint"
"bluetooth"
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 @@ -1575,6 +1575,8 @@ self: super: with self; {

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

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

bluemaestro-ble = callPackage ../development/python-modules/bluemaestro-ble { };

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

0 comments on commit 654ff63

Please sign in to comment.