Add Home Assistant integration
Token-authenticated custom component exposing live per-club member counts as sensors under a single "West Wood Club" device, fed by one coordinator polling `/v1/Clubs/WhoIsInCount`. Packaged via `buildHomeAssistantComponent` with a flake package + overlay so it can be used in `services.home-assistant.customComponents`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -7,11 +7,33 @@
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
# Adds the integration to pkgs.home-assistant-custom-components so it can be
|
||||
# used directly in services.home-assistant.customComponents.
|
||||
overlay = final: prev: {
|
||||
home-assistant-custom-components = prev.home-assistant-custom-components // {
|
||||
west_wood_club = final.buildHomeAssistantComponent {
|
||||
owner = "deplayer0";
|
||||
domain = "west_wood_club";
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
overlays.default = overlay;
|
||||
}
|
||||
// flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs = nixpkgs.legacyPackages.${system}.extend overlay;
|
||||
in
|
||||
{
|
||||
packages = rec {
|
||||
west_wood_club = pkgs.home-assistant-custom-components.west_wood_club;
|
||||
default = west_wood_club;
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
mitmproxy
|
||||
|
||||
Reference in New Issue
Block a user