-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
home-assistant-custom-{components,lovelace-modules}: implement auto-c…
…alling Kill the tedious work of setting up attributes manually.
- Loading branch information
Showing
3 changed files
with
35 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
lib, | ||
callPackage, | ||
baseDirectory, | ||
}: | ||
|
||
let | ||
inherit (lib) | ||
filterAttrs | ||
mapAttrs' | ||
nameValuePair | ||
; | ||
|
||
inherit (builtins) | ||
readDir | ||
; | ||
|
||
toPackageAttribute = | ||
dir: type: nameValuePair dir (callPackage (baseDirectory + "/${dir}/default.nix") { }); | ||
in | ||
mapAttrs' toPackageAttribute (filterAttrs (_: type: type == "directory") (readDir baseDirectory)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,10 @@ | ||
{ callPackage | ||
}: | ||
|
||
{ | ||
adaptive_lighting = callPackage ./adaptive_lighting {}; | ||
|
||
alarmo = callPackage ./alarmo {}; | ||
|
||
auth-header = callPackage ./auth-header {}; | ||
|
||
awtrix = callPackage ./awtrix {}; | ||
|
||
better_thermostat = callPackage ./better_thermostat {}; | ||
|
||
dwd = callPackage ./dwd { }; | ||
|
||
elevenlabs_tts = callPackage ./elevenlabs_tts {}; | ||
|
||
emporia_vue = callPackage ./emporia_vue {}; | ||
|
||
epex_spot = callPackage ./epex_spot {}; | ||
|
||
frigate = callPackage ./frigate {}; | ||
|
||
garmin_connect = callPackage ./garmin_connect {}; | ||
|
||
govee-lan = callPackage ./govee-lan {}; | ||
|
||
gpio = callPackage ./gpio {}; | ||
|
||
homematicip_local = callPackage ./homematicip_local { }; | ||
|
||
indego = callPackage ./indego { }; | ||
|
||
local_luftdaten = callPackage ./local_luftdaten { }; | ||
|
||
localtuya = callPackage ./localtuya {}; | ||
|
||
mass = callPackage ./mass { }; | ||
|
||
midea_ac_lan = callPackage ./midea_ac_lan {}; | ||
|
||
midea-air-appliances-lan = callPackage ./midea-air-appliances-lan {}; | ||
|
||
miele = callPackage ./miele {}; | ||
|
||
moonraker = callPackage ./moonraker {}; | ||
|
||
ntfy = callPackage ./ntfy {}; | ||
|
||
omnik_inverter = callPackage ./omnik_inverter {}; | ||
|
||
prometheus_sensor = callPackage ./prometheus_sensor {}; | ||
|
||
samsungtv-smart = callPackage ./samsungtv-smart {}; | ||
|
||
sensi = callPackage ./sensi {}; | ||
|
||
smartir = callPackage ./smartir {}; | ||
|
||
smartthinq-sensors = callPackage ./smartthinq-sensors {}; | ||
|
||
solis-sensor = callPackage ./solis-sensor {}; | ||
|
||
somweb = callPackage ./somweb {}; | ||
|
||
spook = callPackage ./spook {}; | ||
|
||
tuya_local = callPackage ./tuya_local {}; | ||
|
||
volkswagen_we_connect_id = callPackage ./volkswagen_we_connect_id { }; | ||
|
||
volkswagencarnet = callPackage ./volkswagencarnet { }; | ||
|
||
waste_collection_schedule = callPackage ./waste_collection_schedule {}; | ||
|
||
xiaomi_gateway3 = callPackage ./xiaomi_gateway3 {}; | ||
|
||
xiaomi_miot = callPackage ./xiaomi_miot {}; | ||
callPackage, | ||
lib, | ||
... | ||
}: | ||
|
||
yassi = callPackage ./yassi {}; | ||
import ../autocalling-package-set.nix { | ||
inherit callPackage lib; | ||
baseDirectory = ./.; | ||
} |
47 changes: 7 additions & 40 deletions
47
pkgs/servers/home-assistant/custom-lovelace-modules/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,13 @@ | ||
{ | ||
callPackage, | ||
lib, | ||
pkgs, | ||
callPackage, | ||
... | ||
}: | ||
|
||
{ | ||
apexcharts-card = callPackage ./apexcharts-card { }; | ||
|
||
atomic-calendar-revive = callPackage ./atomic-calendar-revive { }; | ||
|
||
button-card = callPackage ./button-card { }; | ||
|
||
card-mod = callPackage ./card-mod { }; | ||
|
||
decluttering-card = callPackage ./decluttering-card { }; | ||
|
||
hourly-weather = callPackage ./hourly-weather { }; | ||
|
||
lg-webos-remote-control = callPackage ./lg-webos-remote-control { }; | ||
|
||
light-entity-card = callPackage ./light-entity-card { }; | ||
|
||
mini-graph-card = callPackage ./mini-graph-card {}; | ||
|
||
mini-media-player = callPackage ./mini-media-player {}; | ||
|
||
multiple-entity-row = callPackage ./multiple-entity-row { }; | ||
|
||
mushroom = callPackage ./mushroom { }; | ||
|
||
rmv-card = callPackage ./rmv-card { }; | ||
|
||
template-entity-row = callPackage ./template-entity-row { }; | ||
|
||
universal-remote-card = callPackage ./universal-remote-card { }; | ||
|
||
valetudo-map-card = callPackage ./valetudo-map-card { }; | ||
|
||
zigbee2mqtt-networkmap = callPackage ./zigbee2mqtt-networkmap { }; | ||
} | ||
// lib.optionalAttrs pkgs.config.allowAliases { | ||
android-tv-card = | ||
lib.warn "`home-assistant-custom-lovelace-modules.android-tv-card` has been renamed to `universal-remote-card`" | ||
pkgs.home-assistant-custom-lovelace-modules.universal-remote-card; | ||
(import ../autocalling-package-set.nix { | ||
inherit callPackage lib; | ||
baseDirectory = ./.; | ||
}) // lib.optionalAttrs pkgs.config.allowAliases { | ||
android-tv-card = lib.warn "`home-assistant-custom-lovelace-modules.android-tv-card` has been renamed to `universal-remote-card`" pkgs.home-assistant-custom-lovelace-modules.universal-remote-card; | ||
} |