Merge pull request #126984 from mweinelt/home-assistant

This commit is contained in:
Martin Weinelt 2021-06-16 13:28:10 +02:00 committed by GitHub
commit 2a00e3b7f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 50 additions and 16 deletions

View file

@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, requests
}:
buildPythonPackage rec {
pname = "garminconnect-ha";
version = "0.1.6";
src = fetchFromGitHub {
owner = "cyberjunky";
repo = "python-garminconnect-ha";
rev = version;
sha256 = "0ngas6zikhpja1cdkq64m9pjm4b0z3qaj9g3x88mggy60jsxm1d7";
};
propagatedBuildInputs = [
requests
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "garminconnect_ha" ];
meta = with lib; {
description = "Minimal Garmin Connect Python 3 API wrapper for Home Assistant";
homepage = "https://github.com/cyberjunky/python-garminconnect-ha";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -12,14 +12,14 @@
buildPythonPackage rec {
pname = "pydaikin";
version = "2.4.1";
version = "2.4.2";
disabled = pythonOlder "3.6";
src = fetchFromBitbucket {
owner = "mustang51";
repo = pname;
rev = "v${version}";
sha256 = "1624adp4lqd1n9flnf0wqrcibml2nd19ga3fmxzjg4x5z6767bs3";
sha256 = "13cslszjhd1x7j0ja0n0wpy62hb2sdmkrmjl3qhwqfggps2w2wy1";
};
propagatedBuildInputs = [
@ -28,6 +28,10 @@ buildPythonPackage rec {
urllib3
];
# while they have tests, they do not run them in their CI and they fail as of 2.4.2
# AttributeError: 'DaikinBRP069' object has no attribute 'last_hour_cool_energy_consumption'
doCheck = false;
checkInputs = [
freezegun
pytest-aiohttp

View file

@ -2,7 +2,7 @@
# Do not edit!
{
version = "2021.6.4";
version = "2021.6.5";
components = {
"abode" = ps: with ps; [ abodepy ];
"accuweather" = ps: with ps; [ accuweather ];
@ -293,7 +293,7 @@
"futurenow" = ps: with ps; [ pyfnip ];
"garadget" = ps: with ps; [ ];
"garages_amsterdam" = ps: with ps; [ garages-amsterdam ];
"garmin_connect" = ps: with ps; [ garminconnect-aio ];
"garmin_connect" = ps: with ps; [ garminconnect-ha ];
"gc100" = ps: with ps; [ ]; # missing inputs: python-gc100
"gdacs" = ps: with ps; [ aio-georss-gdacs ];
"generic" = ps: with ps; [ ];

View file

@ -3,7 +3,6 @@
, fetchFromGitHub
, python3
, inetutils
, tzdata
, nixosTests
# Look up dependencies of specified components in component-packages.nix
@ -52,12 +51,12 @@ let
# https://github.com/home-assistant/core/pull/48137 was merged
(self: super: {
iaqualink = super.iaqualink.overridePythonAttrs (oldAttrs: rec {
version = "0.3.4";
version = "0.3.90";
src = fetchFromGitHub {
owner = "flz";
repo = "iaqualink-py";
rev = "v${version}";
sha256 = "16mn6nd9x3hm6j6da99qhwbqs95hh8wx21r1h1m9csl76z77n9lh";
sha256 = "0c8ckbbr1n8gx5k63ymgyfkbz3d0rbdvghg8fqdvbg4nrigrs5v0";
};
checkInputs = oldAttrs.checkInputs ++ [ python3.pkgs.asynctest ];
});
@ -181,7 +180,7 @@ let
extraBuildInputs = extraPackages py.pkgs;
# Don't forget to run parse-requirements.py after updating
hassVersion = "2021.6.4";
hassVersion = "2021.6.5";
in with py.pkgs; buildPythonApplication rec {
pname = "homeassistant";
@ -200,7 +199,7 @@ in with py.pkgs; buildPythonApplication rec {
owner = "home-assistant";
repo = "core";
rev = version;
sha256 = "058dx5hg0a3zvd85sxglbadigfzajmzx8i5jxvw0ww9yp8002qj1";
sha256 = "1cp294hy35k9hjbp8iqmaf1m5qbbkh3jwf92ym49waw8di5a5wvh";
};
# leave this in, so users don't have to constantly update their downstream patch handling
@ -219,7 +218,7 @@ in with py.pkgs; buildPythonApplication rec {
'';
propagatedBuildInputs = [
# Only packages required in setup.py + hass-frontend
# Only packages required in setup.py
aiohttp
astral
async-timeout
@ -789,9 +788,6 @@ in with py.pkgs; buildPythonApplication rec {
# put ping binary into PATH, e.g. for wake_on_lan tests
export PATH=${inetutils}/bin:$PATH
# set up zoneinfo data for backports-zoneinfo in pvpc_hourly_pricing tests
export PYTHONTZPATH="${tzdata}/share/zoneinfo"
# error out when component test directory is missing, otherwise hidden by xdist execution :(
for component in ${lib.concatStringsSep " " (map lib.escapeShellArg componentTests)}; do
test -d "tests/components/$component" || {
@ -802,11 +798,10 @@ in with py.pkgs; buildPythonApplication rec {
'';
passthru = {
inherit (py.pkgs) hass-frontend;
python = py;
tests = {
inherit (nixosTests) home-assistant;
};
python = py;
};
meta = with lib; {

View file

@ -26,7 +26,7 @@ sed -i -e "s/hassVersion =.*/hassVersion = \"${TARGET_VERSION}\";/" \
./parse-requirements.py
(
cd ../../..
nix-update --version "$FRONTEND_VERSION" home-assistant.hass-frontend
nix-update --version "$FRONTEND_VERSION" home-assistant.python.pkgs.home-assistant-frontend
nix-update --version "$TARGET_VERSION" --build home-assistant
)

View file

@ -2718,6 +2718,8 @@ in {
garminconnect-aio = callPackage ../development/python-modules/garminconnect-aio { };
garminconnect-ha = callPackage ../development/python-modules/garminconnect-ha { };
gast = callPackage ../development/python-modules/gast { };
garages-amsterdam = callPackage ../development/python-modules/garages-amsterdam { };