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

This commit is contained in:
Martin Weinelt
2025-01-03 04:00:35 +01:00
committed by GitHub
3 changed files with 77 additions and 0 deletions
@@ -0,0 +1,44 @@
{
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.";
};
}
@@ -0,0 +1,31 @@
{
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
View File
@@ -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 { };