Unverified Commit 8f3505c7 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

home-assistant: support livisi component (#372347)

parents c8b29174 0ecf2a6b
Loading
Loading
Loading
Loading
+0 −48
Original line number Diff line number Diff line
{
  lib,
  aiohttp,
  buildPythonPackage,
  fetchPypi,
  pydantic,
  pythonOlder,
  websockets,
}:

buildPythonPackage rec {
  pname = "aiolivisi";
  version = "0.0.19";
  format = "setuptools";

  disabled = pythonOlder "3.8";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-eT/sqLykd4gQVt972646mH+QArf7p/XQH53/UtsuKRs=";
  };

  postPatch = ''
    # https://github.com/StefanIacobLivisi/aiolivisi/pull/3
    substituteInPlace setup.py \
      --replace 'REQUIREMENTS = list(val.strip() for val in open("requirements.txt"))' "" \
      --replace "REQUIREMENTS," "[],"
  '';

  propagatedBuildInputs = [
    aiohttp
    pydantic
    websockets
  ];

  # Module has no tests
  doCheck = false;

  pythonImportsCheck = [ "aiolivisi" ];

  meta = with lib; {
    description = "Module to communicate with LIVISI Smart Home Controller";
    homepage = "https://github.com/StefanIacobLivisi/aiolivisi";
    changelog = "https://github.com/StefanIacobLivisi/aiolivisi/releases/tag/${version}";
    license = with licenses; [ asl20 ];
    maintainers = with maintainers; [ fab ];
  };
}
+42 −0
Original line number Diff line number Diff line
{
  aiohttp,
  buildPythonPackage,
  colorlog,
  fetchFromGitHub,
  lib,
  setuptools,
  websockets,
}:

buildPythonPackage rec {
  pname = "livisi";
  version = "0.0.24";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "planbnet";
    repo = "livisi";
    tag = "v${version}";
    hash = "sha256-ggEbzN9FfqT968hgOblIh5dfVibzgUEc4SoZfBGOCwo=";
  };

  build-system = [ setuptools ];

  dependencies = [
    aiohttp
    colorlog
    websockets
  ];

  pythonImportsCheck = [ "livisi" ];

  # upstream has no tests
  doCheck = false;

  meta = {
    description = "Connection library for the abandoned Livisi Smart Home system";
    homepage = "https://github.com/planbnet/livisi";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}
+3 −1
Original line number Diff line number Diff line
@@ -3145,7 +3145,8 @@
      ];
    "livisi" =
      ps: with ps; [
      ]; # missing inputs: livisi
        livisi
      ];
    "llamalab_automate" =
      ps: with ps; [
      ];
@@ -6913,6 +6914,7 @@
    "linkplay"
    "litejet"
    "litterrobot"
    "livisi"
    "local_calendar"
    "local_file"
    "local_ip"
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ mapAliases ({
  aiomysensors = throw "aiomysensors has been removed, as it was packaged for Home Assistant, which migrated to pymysensors."; # Added 2024-07-07
  aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30
  aiolip = throw "aiolip has been removed because the upstream repository was archived in 2021"; # Added 2024-10-04
  aiolivisi = throw "aiolivisi was removed because Home Assistant switched to livisi"; # added 2025-01-09
  aionotify = throw "aionotify has been removed because is unmaintained and incompatible with python3.11."; # Added 2023-10-27
  aiosenseme = throw "aiosenseme has been removed, because it does no longer work with the latest firmware and has become unmaintained"; # Added 2023-07-05
  aioquic-mitmproxy = throw "aioquic-mitmproxy has been removed because mitmproxy no longer uses it"; # Added 2024-01-16
+2 −2
Original line number Diff line number Diff line
@@ -325,8 +325,6 @@ self: super: with self; {
  aiolimiter = callPackage ../development/python-modules/aiolimiter { };
  aiolivisi = callPackage ../development/python-modules/aiolivisi { };
  aiolyric = callPackage ../development/python-modules/aiolyric { };
  aiomcache = callPackage ../development/python-modules/aiomcache { };
@@ -7540,6 +7538,8 @@ self: super: with self; {
  livereload = callPackage ../development/python-modules/livereload { };
  livisi = callPackage ../development/python-modules/livisi { };
  lizard = callPackage ../development/python-modules/lizard { };
  llama-cpp-python = callPackage ../development/python-modules/llama-cpp-python { };