Unverified Commit 32a0af89 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

home-assistant: Add support for Yoto custom component (#368833)

parents 9883c610 eb75913a
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  pytz,
  requests,
  paho-mqtt,
}:

buildPythonPackage rec {
  pname = "yoto-api";
  version = "1.24.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "cdnninja";
    repo = "yoto_api";
    tag = "v${version}";
    hash = "sha256-wbqeRTYHDpxKqOwTRkkYGtgYOmnyNQY50dnvI0WprwA=";
  };

  build-system = [ setuptools ];

  dependencies = [
    pytz
    requests
    paho-mqtt
  ];

  # All tests require access to and authentication with the Yoto API (api.yotoplay.com).
  doCheck = false;

  pythonImportsCheck = [ "yoto_api" ];

  meta = with lib; {
    changelog = "https://github.com/cdnninja/yoto_api/releases/tag/${src.tag}";
    homepage = "https://github.com/cdnninja/yoto_api";
    platforms = platforms.unix;
    maintainers = with maintainers; [ seberm ];
    license = licenses.mit;
    description = "A python package that makes it a bit easier to work with the yoto play API.";
  };
}
+31 −0
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  buildHomeAssistantComponent,
  yoto-api,
}:

buildHomeAssistantComponent rec {
  owner = "cdnninja";
  domain = "yoto";
  version = "1.22.0";

  src = fetchFromGitHub {
    owner = "cdnninja";
    repo = "yoto_ha";
    tag = "v${version}";
    hash = "sha256-uaakUxuPxYqLnE2UK6ept91Lycvvhr0r9vZw44y1W4g=";
  };

  dependencies = [
    yoto-api
  ];

  meta = with lib; {
    changelog = "https://github.com/cdnninja/yoto_ha/releases/tag/${src.tag}";
    description = "Home Assistant Integration for Yoto.";
    homepage = "https://github.com/cdnninja/yoto_ha";
    maintainers = with maintainers; [ seberm ];
    license = licenses.mit;
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -18311,6 +18311,8 @@ self: super: with self; {
    python3 = python;
  });
  yoto-api = callPackage ../development/python-modules/yoto-api { };
  youless-api = callPackage ../development/python-modules/youless-api { };
  youseedee = callPackage ../development/python-modules/youseedee { };