Unverified Commit 7bffccf7 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

home-assistant: support niko_home_control component (#372349)

parents 8f3505c7 5df8a843
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
{
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  nclib,
  setuptools,
}:

buildPythonPackage rec {
  pname = "nhc";
  version = "0.3.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "vandeurenglenn";
    repo = "nhc";
    tag = "v${version}";
    hash = "sha256-s3DVdnjhRUZRG/LwKwOuZSiNtzpccBtHl/PNvux/NwQ=";
  };

  build-system = [ setuptools ];

  dependencies = [
    nclib
  ];

  pythonImportsCheck = [ "nhc" ];

  # upstream has no test
  doCheck = false;

  meta = {
    changelog = "https://github.com/vandeurenglenn/nhc/blob/${src.tag}/CHANGELOG.md";
    description = "SDK for Niko Home Control";
    homepage = "https://github.com/vandeurenglenn/nhc";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}
+0 −42
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  nclib,
  netaddr,
  netifaces,
  pythonOlder,
}:

buildPythonPackage rec {
  pname = "niko-home-control";
  version = "0.3.0";
  format = "setuptools";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "NoUseFreak";
    repo = pname;
    rev = version;
    sha256 = "sha256-n/uQAX2LgxeGTRF56+G5vm5wbeTQQQODV4EKaPgKw1k=";
  };

  propagatedBuildInputs = [
    nclib
    netaddr
    netifaces
  ];

  # Project has no tests
  doCheck = false;

  pythonImportsCheck = [ "nikohomecontrol" ];

  meta = with lib; {
    description = "Python SDK for Niko Home Control";
    homepage = "https://github.com/NoUseFreak/niko-home-control";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}
+3 −1
Original line number Diff line number Diff line
@@ -3797,7 +3797,8 @@
      ];
    "niko_home_control" =
      ps: with ps; [
      ]; # missing inputs: nhc
        nhc
      ];
    "nilu" =
      ps: with ps; [
        niluclient
@@ -7010,6 +7011,7 @@
    "nibe_heatpump"
    "nice_go"
    "nightscout"
    "niko_home_control"
    "nina"
    "nmap_tracker"
    "no_ip"
+1 −0
Original line number Diff line number Diff line
@@ -380,6 +380,7 @@ mapAliases ({
  mypy-boto3-mobile = throw "mypy-boto3-mobile was removed because it is unmaintained"; # added 2024-09-04
  net2grid = gridnet; # add 2022-04-22
  nghttp2 = throw "in 1.52.0 removed deprecated python bindings."; # added 2023-06-08
  niko-home-control = throw "niko-home-control was removed because Home Assistant switched to nhc"; # added 2025-01-09
  ninja-python = ninja; # add 2022-08-03
  nose = throw "nose has been removed since it has been deprecated and unmaintained for almost a decade and does not work on Python 3.12; please switch to pytest or another test runner/framework"; # added 2024-07-28
  nose3 = throw "nose3 has been removed since it is unmaintained and does not work with Python 3.12"; # added 2024-07-28
+2 −2
Original line number Diff line number Diff line
@@ -9214,6 +9214,8 @@ self: super: with self; {
  nh3 = callPackage ../development/python-modules/nh3 { };
  nhc = callPackage ../development/python-modules/nhc { };
  niaaml = callPackage ../development/python-modules/niaaml { };
  nianet = callPackage ../development/python-modules/nianet { };
@@ -9240,8 +9242,6 @@ self: super: with self; {
  nikola = callPackage ../development/python-modules/nikola { };
  niko-home-control = callPackage ../development/python-modules/niko-home-control { };
  nilearn = callPackage ../development/python-modules/nilearn { };
  niluclient = callPackage ../development/python-modules/niluclient { };