depot/third_party/nixpkgs/pkgs/servers/home-assistant/custom-components
2024-12-13 20:54:23 +00:00
..
adaptive_lighting Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
alarmo Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
auth-header Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
average Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
awtrix Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
better_thermostat Merge commit '4a76db24018f6ce64d2097415750bd8555211cdd' into HEAD 2024-11-16 15:43:04 +00:00
bodymiscale Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
climate_group Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
dirigera_platform Merge commit '4a76db24018f6ce64d2097415750bd8555211cdd' into HEAD 2024-11-16 15:43:04 +00:00
dwd Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
elevenlabs_tts Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
emporia_vue Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
epex_spot Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
frigate Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
garmin_connect Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
govee-lan Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
gpio Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
homematicip_local Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
indego Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
local_luftdaten Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
localtuya Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
mass Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
midea-air-appliances-lan Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
midea_ac Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
midea_ac_lan Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
miele Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
moonraker Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
nest_protect Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
ntfy Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
omnik_inverter Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
prometheus_sensor Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
samsungtv-smart Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
sensi Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
smartir Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
smartthinq-sensors Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
solax_modbus Merge commit 'd287198d5ae23957317125ed3ecc5a3fc96db50e' into HEAD 2024-12-06 21:04:41 +00:00
solis-sensor Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
somweb Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
spook Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
systemair Merge commit '3ed4d12aac391a1eb607b388e386854780fd3cd3' into HEAD 2024-11-23 21:16:41 +00:00
tuya_local Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
volkswagen_we_connect_id Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
volkswagencarnet Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00
waste_collection_schedule Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
xiaomi_gateway3 Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
xiaomi_miot Merge commit 'd287198d5ae23957317125ed3ecc5a3fc96db50e' into HEAD 2024-12-06 21:04:41 +00:00
yassi Merge commit 'fece082f6c165d89daf650c3b80a074079b8af50' into HEAD 2024-12-13 20:54:23 +00:00
README.md Merge commit '57725ef3ec0b51fea97137fca7cb8f14c98b4525' as 'third_party/nixpkgs' 2024-11-10 23:59:47 +00:00

Packaging guidelines

buildHomeAssistantComponent

Custom components should be packaged using the buildHomeAssistantComponent function, that is provided at top-level. It builds upon buildPythonPackage but uses a custom install and check phase.

Python runtime dependencies can be directly consumed as unqualified function arguments. Pass them into propagatedBuildInputs, for them to be available to Home Assistant.

Out-of-tree components need to use Python packages from home-assistant.python.pkgs as to not introduce conflicting package versions into the Python environment.

Example Boilerplate:

{ lib
, buildHomeAssistantComponent
, fetchFromGitHub
}:

buildHomeAssistantComponent {
  # owner, domain, version

  src = fetchFromGithub {
    # owner, repo, rev, hash
  };

  propagatedBuildInputs = [
    # python requirements, as specified in manifest.json
  ];

  meta = with lib; {
    # changelog, description, homepage, license, maintainers
  };
}

Package attribute

The attribute name must reflect the domain as seen in the manifest.json, which in turn will match the python module name below in the custom_components/ directory.

Example:

The project mweinelt/ha-prometheus-sensor would receive the attribute name "prometheus_sensor", because both domain in the manifest.json as well as the module name are prometheus_sensor.

Package name

The pname attribute is a composition of both owner and domain.

Don't set pname, set owner and domain instead.

Exposing the domain attribute separately allows checking for conflicting components at eval time.

Manifest check

The buildHomeAssistantComponent builder uses a hook to check whether the dependencies specified in the manifest.json are present and inside the specified version range. It also makes sure derivation and manifest agree about the domain name.

There shouldn't be a need to disable this hook, but you can set dontCheckManifest to true in the derivation to achieve that.