From 6b62eac2bf0ebcc57821b8a3f9df1a96d11fbaa5 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 16 Feb 2025 12:45:05 +0000 Subject: [PATCH] Add tapo_control custom hass component --- .../customComponents/tapo_control.nix | 19 +++++++++++++++++++ system/services/home-assistant/default.nix | 16 +++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 system/services/home-assistant/customComponents/tapo_control.nix diff --git a/system/services/home-assistant/customComponents/tapo_control.nix b/system/services/home-assistant/customComponents/tapo_control.nix new file mode 100644 index 00000000..ba5e6979 --- /dev/null +++ b/system/services/home-assistant/customComponents/tapo_control.nix @@ -0,0 +1,19 @@ +{ + fetchFromGitHub, + buildHomeAssistantComponent, + pytapo, +}: + +buildHomeAssistantComponent rec { + owner = "JurajNyiri"; + domain = "tapo_control"; + version = "5.8.0"; + src = fetchFromGitHub { + owner = "JurajNyiri"; + repo = "HomeAssistant-Tapo-Control"; + rev = version; + hash = "sha256-JNCuWYBlc0kIa6wL1XEZdO/IL5R3Xa8qFBOhA0PooiA="; + }; + dependencies = [ pytapo ]; + ignoreVersionRequirement = [ "pytapo" ]; +} diff --git a/system/services/home-assistant/default.nix b/system/services/home-assistant/default.nix index 7dcfd2a6..d6a7e360 100644 --- a/system/services/home-assistant/default.nix +++ b/system/services/home-assistant/default.nix @@ -15,8 +15,10 @@ # Extra integrations "apple_tv" "bluetooth" + "ffmpeg" # Tapo "mobile_app" "nanoleaf" + "onvif" # Tapo "proximity" "prusalink" "sonos" @@ -24,11 +26,15 @@ "tado" "tplink_tapo" ]; - customComponents = with pkgs.home-assistant-custom-components; [ - (dirigera_platform.override { - dirigera = (pkgs.python312Packages.dirigera.overrideAttrs (final: prev: { doCheck = false; })); - }) - ]; + customComponents = + (with pkgs.home-assistant-custom-components; [ + (dirigera_platform.override { + dirigera = (pkgs.python312Packages.dirigera.overrideAttrs (final: prev: { doCheck = false; })); + }) + ]) + ++ (with pkgs; [ + (home-assistant.python.pkgs.callPackage ./customComponents/tapo_control.nix { }) + ]); config = { # Includes dependencies for a basic setup # https://www.home-assistant.io/integrations/default_config/