home-assistant-custom-components.sleep_as_android: init at 2.3.2 (#389793)

This commit is contained in:
Martin Weinelt
2025-03-15 21:02:02 +01:00
committed by GitHub
2 changed files with 71 additions and 0 deletions
+6
View File
@@ -3201,6 +3201,12 @@
githubId = 77934086;
keys = [ { fingerprint = "4CA3 48F6 8FE1 1777 8EDA 3860 B9A2 C1B0 25EC 2C55"; } ];
};
blenderfreaky = {
name = "blenderfreaky";
email = "nix@blenderfreaky.de";
github = "blenderfreaky";
githubId = 14351657;
};
blinry = {
name = "blinry";
email = "mail@blinry.org";
@@ -0,0 +1,65 @@
{
lib,
buildHomeAssistantComponent,
fetchFromGitHub,
pyhaversion,
nix-update-script,
# Test dependencies
pytestCheckHook,
pytest-homeassistant-custom-component,
aiohttp-cors,
paho-mqtt,
}:
let
version = "2.3.2";
in
buildHomeAssistantComponent {
owner = "IATkachenko";
domain = "sleep_as_android";
inherit version;
src = fetchFromGitHub {
owner = "IATkachenko";
repo = "HA-SleepAsAndroid";
tag = "v${version}";
hash = "sha256-aJKjHZcRdmiXJdtWRY4fv5oxCHTDIVpvZEwhIE9ISv8=";
};
dependencies = [
pyhaversion
];
nativeCheckInputs = [
pytestCheckHook
pytest-homeassistant-custom-component
aiohttp-cors
paho-mqtt
];
pytestFlagsArray = [
# Fixes `AttributeError: 'async_generator' object has no attribute 'data'`
# See https://github.com/MatthewFlamm/pytest-homeassistant-custom-component/issues/158
"--asyncio-mode=auto"
];
disabledTests = [
# Broken on upstream, see https://github.com/IATkachenko/HA-SleepAsAndroid/issues/85
# AttributeError: module 'homeassistant.data_entry_flow' has no attribute 'RESULT_TYPE_FORM'
"test_successful_config_flow"
"test_options_flow"
# Likely fails due to --asyncio-mode=auto
# TypeError: object MagicMock can't be used in 'await' expression
"test_async_setup_entry"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Sleep As Android integration for Home Assistant";
homepage = "https://github.com/IATkachenko/HA-SleepAsAndroid";
changelog = "https://github.com/IATkachenko/HA-SleepAsAndroid/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ blenderfreaky ];
};
}