about summary refs log tree commit diff
path: root/pkgs/servers/home-assistant/custom-components/smartir/default.nix
blob: 5dc9eb2473d72a9e5817c88d5dc7e6d99b7bb486 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib
, buildHomeAssistantComponent
, fetchFromGitHub
, aiofiles
, broadlink
}:

buildHomeAssistantComponent rec {
  owner = "smartHomeHub";
  domain = "smartir";
  version = "1.17.9";

  src = fetchFromGitHub {
    owner = "smartHomeHub";
    repo = "SmartIR";
    rev = version;
    hash = "sha256-E6TM761cuaeQzlbjA+oZ+wt5HTJAfkF2J3i4P1Wbuic=";
  };

  propagatedBuildInputs = [
    aiofiles
    broadlink
  ];

  dontBuild = true;

  postInstall = ''
    cp -r codes $out/custom_components/smartir/
  '';

  meta = with lib; {
    changelog = "https://github.com/smartHomeHub/SmartIR/releases/tag/v${version}";
    description = "Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)";
    homepage = "https://github.com/smartHomeHub/SmartIR";
    maintainers = with maintainers; [ azuwis ];
    license = licenses.mit;
  };
}