nixpkgs/pkgs/servers/home-assistant/custom-components
2024-10-27 23:56:04 -06:00
..
adaptive_lighting home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
alarmo home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
auth-header home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
average home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
awtrix home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
better_thermostat home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
bodymiscale home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
dwd home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
elevenlabs_tts home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
emporia_vue home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
epex_spot home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
frigate home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
garmin_connect home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
govee-lan home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
gpio home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
homematicip_local home-assistant-custom-components.homematicip_local: 1.67.0 -> 1.68.1 2024-10-27 10:41:54 -07:00
indego home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
local_luftdaten home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
localtuya home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
mass home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
midea_ac home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
midea_ac_lan home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
midea-air-appliances-lan home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
miele home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
moonraker home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
nest_protect home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
ntfy home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
omnik_inverter home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
prometheus_sensor home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
samsungtv-smart home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
sensi home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
smartir home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
smartthinq-sensors home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
solax_modbus home-assistant-custom-components.solax_modbus: 2024.10.3 -> 2024.10.4 2024-10-23 11:30:52 +02:00
solis-sensor Merge remote-tracking branch 'origin/master' into staging-next 2024-10-22 09:14:28 -06:00
somweb home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
spook home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
tuya_local home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
volkswagen_we_connect_id home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
volkswagencarnet home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
waste_collection_schedule home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
xiaomi_gateway3 home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
xiaomi_miot home-assistant-custom-components.xiaomi_miot: 0.7.20 -> 0.7.21 2024-10-27 19:25:48 +00:00
yassi home-assistant-custom-components.*: make use of lib.packagesFromDirectoryRecursive 2024-10-21 20:56:43 +08:00
README.md home-assistant-custom-components: fix typo 2024-07-22 08:14:17 -07: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.