diff --git a/pkgs/servers/home-assistant/custom-components/amshan-homeassistant/package.nix b/pkgs/servers/home-assistant/custom-components/amshan-homeassistant/package.nix new file mode 100644 index 00000000000000..bedc3527104e0f --- /dev/null +++ b/pkgs/servers/home-assistant/custom-components/amshan-homeassistant/package.nix @@ -0,0 +1,34 @@ +{ + lib, + fetchFromGitHub, + buildHomeAssistantComponent, + amshan, +}: + +buildHomeAssistantComponent rec { + owner = "toreamun"; + domain = "amshan"; + version = "2023.6.0"; + + src = fetchFromGitHub { + owner = "toreamun"; + repo = "amshan-homeassistant"; + rev = "refs/tags/${version}"; + hash = "sha256-BPFGbBLZvXMWiMlvBB5KMetxetuz691Xl58rZ+AMocg="; + }; + + propagatedBuildInputs = [ + amshan + ]; + + meta = { + description = "Home Assistant integration for electricity meters (AMS/HAN/P1)"; + longDescription = '' + The integraiton supports both streaming (serial port / TCP/IP) and MQTT + (Tibber Pulse, energyintelligence.se etc.). + ''; + homepage = "https://github.com/toreamun/amshan-homeassistant"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ bjornfor ]; + }; +}