summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados/sensors/spaceapi.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-12-01 23:20:31 +0100
committermakefu <github@syntax-fehler.de>2020-12-01 23:20:31 +0100
commitc370c87da36bc256cfbc59bb2b0b9ffa1d457168 (patch)
tree43b5ef43963f9cedcb7273d7fb1c4dc01afffb62 /krebs/2configs/shack/glados/sensors/spaceapi.nix
parent9f2c161de0f7e807e66dd114f913db6acecd666b (diff)
shack/glados: utilize mergeable home-assistant config
Diffstat (limited to 'krebs/2configs/shack/glados/sensors/spaceapi.nix')
-rw-r--r--krebs/2configs/shack/glados/sensors/spaceapi.nix107
1 files changed, 55 insertions, 52 deletions
diff --git a/krebs/2configs/shack/glados/sensors/spaceapi.nix b/krebs/2configs/shack/glados/sensors/spaceapi.nix
index 11cab11c9..ea20ad29d 100644
--- a/krebs/2configs/shack/glados/sensors/spaceapi.nix
+++ b/krebs/2configs/shack/glados/sensors/spaceapi.nix
@@ -1,52 +1,55 @@
-[
- {
- platform = "rest";
- resource = "https://spaceapi.afra-berlin.de/v1/status.json";
- method = "GET";
- name = "Door AFRA Berlin";
- device_class = "door";
- value_template = "{{ value_json.open }}";
- }
- {
- platform = "rest";
- resource = "http://club.entropia.de/spaceapi";
- method = "GET";
- name = "Door Entropia";
- device_class = "door";
- value_template = "{{ value_json.open }}";
- }
- {
- platform = "rest";
- resource = "http://www.c-base.org/status.json";
- method = "GET";
- name = "Door C-Base Berlin";
- device_class = "door";
- value_template = "{{ value_json.open }}";
- }
- {
- platform = "rest";
- resource = "https://status.raumzeitlabor.de/api/full.json";
- method = "GET";
- name = "Door RZL";
- device_class = "door";
- value_template = "{{ value_json.status }}";
- }
- {
- platform = "rest";
- resource = "https://datenobservatorium.de/";
- method = "GET";
- name = "Door Datenobservatorium";
- device_class = "door";
- value_template = "false";
- scan_interval = 2592000;
- }
- {
- platform = "rest";
- resource = "https://infuanfu.de/";
- method = "GET";
- name = "Door Infuanfu";
- device_class = "door";
- value_template = "false";
- scan_interval = 2592000;
- }
-]
+{
+ services.home-assistant.config.binary_sensor =
+ [
+ {
+ platform = "rest";
+ resource = "https://spaceapi.afra-berlin.de/v1/status.json";
+ method = "GET";
+ name = "Door AFRA Berlin";
+ device_class = "door";
+ value_template = "{{ value_json.open }}";
+ }
+ {
+ platform = "rest";
+ resource = "http://club.entropia.de/spaceapi";
+ method = "GET";
+ name = "Door Entropia";
+ device_class = "door";
+ value_template = "{{ value_json.open }}";
+ }
+ {
+ platform = "rest";
+ resource = "http://www.c-base.org/status.json";
+ method = "GET";
+ name = "Door C-Base Berlin";
+ device_class = "door";
+ value_template = "{{ value_json.open }}";
+ }
+ {
+ platform = "rest";
+ resource = "https://status.raumzeitlabor.de/api/full.json";
+ method = "GET";
+ name = "Door RZL";
+ device_class = "door";
+ value_template = "{{ value_json.status }}";
+ }
+ {
+ platform = "rest";
+ resource = "https://datenobservatorium.de/";
+ method = "GET";
+ name = "Door Datenobservatorium";
+ device_class = "door";
+ value_template = "false";
+ scan_interval = 2592000;
+ }
+ {
+ platform = "rest";
+ resource = "https://infuanfu.de/";
+ method = "GET";
+ name = "Door Infuanfu";
+ device_class = "door";
+ value_template = "false";
+ scan_interval = 2592000;
+ }
+ ];
+}