home-assistant-custom-components.powercalc: init at 1.20.0 (#447189)

This commit is contained in:
Martin Weinelt
2025-12-27 20:06:58 +00:00
committed by GitHub
@@ -0,0 +1,51 @@
{
lib,
buildHomeAssistantComponent,
fetchFromGitHub,
# dependencies
numpy,
# tests
home-assistant,
pytestCheckHook,
pytest-homeassistant-custom-component,
pytest-freezegun,
aioresponses,
}:
buildHomeAssistantComponent rec {
owner = "bramstroker";
domain = "powercalc";
version = "1.20.0";
src = fetchFromGitHub {
inherit owner;
repo = "homeassistant-powercalc";
tag = "v${version}";
hash = "sha256-zncgOnoe24xyVoUBuaUvrL0lqT9COkIPhK3H9SOvd84=";
};
dependencies = [ numpy ];
nativeCheckInputs = [
pytest-homeassistant-custom-component
pytestCheckHook
aioresponses
pytest-freezegun
]
++ home-assistant.getPackages "camera" home-assistant.python.pkgs;
preCheck = ''
patchShebangs --build tests/setup.sh
tests/setup.sh
'';
meta = {
changelog = "https://github.com/bramstroker/homeassistant-powercalc/releases/tag/${src.tag}";
description = "Custom Home Assistant component for virtual power sensors";
homepage = "https://github.com/bramstroker/homeassistant-powercalc";
maintainers = with lib.maintainers; [ CodedNil ];
license = lib.licenses.mit;
};
}