summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/zigbee2mqtt.nix
blob: efcbb0d007c1d62087261d9bb2aaea31fd3f8ce7 (plain)
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
39
40
41
42
43
# provides:
#   switch
#   automation
#   binary_sensor
#   sensor
#   input_select
#   timer
let
  inherit (import ./lib) zigbee;
  prefix = zigbee.prefix;
in
{
  services.home-assistant.config = {
    sensor =

      [
      # Sensor for monitoring the bridge state
      {
        platform = "mqtt";
        name = "Zigbee2mqtt Bridge state";
        state_topic = "${prefix}/bridge/state";
        icon = "mdi:router-wireless";
      }
      # Sensor for Showing the Zigbee2mqtt Version
      {
        platform = "mqtt";
        name = "Zigbee2mqtt Version";
        state_topic = "${prefix}/bridge/config";
        value_template = "{{ value_json.version }}";
        icon = "mdi:zigbee";
      }
      # Sensor for Showing the Coordinator Version
      {
        platform = "mqtt";
        name = "Coordinator Version";
        state_topic = "${prefix}/bridge/config";
        value_template = "{{ value_json.coordinator }}";
        icon = "mdi:chip";
      }
    ];

  };
}