about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2024-02-07 16:21:07 +0100
committerGitHub <noreply@github.com>2024-02-07 16:21:07 +0100
commitbf576e6b59b9b5d46bf0e32d37cd437a093915c5 (patch)
tree9aa10788f07d02f20cc0de84550f8ff1ae78289a
parent743b095b5e004ced89b6a5d04b030d939a08cd8f (diff)
parent57b638490339bdf3795aa76a9f39240499489f0c (diff)
downloadnixlib-bf576e6b59b9b5d46bf0e32d37cd437a093915c5.tar
nixlib-bf576e6b59b9b5d46bf0e32d37cd437a093915c5.tar.gz
nixlib-bf576e6b59b9b5d46bf0e32d37cd437a093915c5.tar.bz2
nixlib-bf576e6b59b9b5d46bf0e32d37cd437a093915c5.tar.lz
nixlib-bf576e6b59b9b5d46bf0e32d37cd437a093915c5.tar.xz
nixlib-bf576e6b59b9b5d46bf0e32d37cd437a093915c5.tar.zst
nixlib-bf576e6b59b9b5d46bf0e32d37cd437a093915c5.zip
Merge pull request #285927 from presto8/home-assistant-emporia-vue
home-assistant-custom-components.emporia_vue: init at 0.8.3
-rw-r--r--pkgs/servers/home-assistant/custom-components/default.nix2
-rw-r--r--pkgs/servers/home-assistant/custom-components/emporia_vue/default.nix36
2 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/servers/home-assistant/custom-components/default.nix b/pkgs/servers/home-assistant/custom-components/default.nix
index c5c6ae60362e..a2c54352d2d8 100644
--- a/pkgs/servers/home-assistant/custom-components/default.nix
+++ b/pkgs/servers/home-assistant/custom-components/default.nix
@@ -4,6 +4,8 @@
 {
   adaptive_lighting = callPackage ./adaptive_lighting {};
 
+  emporia_vue = callPackage ./emporia_vue {};
+
   govee-lan = callPackage ./govee-lan {};
 
   gpio = callPackage ./gpio {};
diff --git a/pkgs/servers/home-assistant/custom-components/emporia_vue/default.nix b/pkgs/servers/home-assistant/custom-components/emporia_vue/default.nix
new file mode 100644
index 000000000000..64b55e214a6d
--- /dev/null
+++ b/pkgs/servers/home-assistant/custom-components/emporia_vue/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, fetchFromGitHub
+, buildHomeAssistantComponent
+, pyemvue
+}:
+
+buildHomeAssistantComponent rec {
+  owner = "presto8";
+  domain = "emporia_vue";
+  version = "0.8.3";
+
+  src = fetchFromGitHub {
+    owner = "magico13";
+    repo = "ha-emporia-vue";
+    rev = "v${version}";
+    hash = "sha256-6NrRuBjpulT66pVUfW9ujULL5HSzfgyic1pKEBRupNA=";
+  };
+
+  propagatedBuildInputs = [
+    pyemvue
+  ];
+
+  postPatch = ''
+    substituteInPlace custom_components/emporia_vue/manifest.json --replace-fail 'pyemvue==0.17.1' 'pyemvue>=0.17.1'
+  '';
+
+  dontBuild = true;
+
+  meta = with lib; {
+    description = "Reads data from the Emporia Vue energy monitor into Home Assistant";
+    homepage = "https://github.com/magico13/ha-emporia-vue";
+    changelog = "https://github.com/magico13/ha-emporia-vue/releases/tag/v${version}";
+    maintainers = with maintainers; [ presto8 ];
+    license = licenses.mit;
+  };
+}