diff --git a/hosts/home-assistant/default.nix b/hosts/home-assistant/default.nix index c9f973f1..ae4ba81a 100644 --- a/hosts/home-assistant/default.nix +++ b/hosts/home-assistant/default.nix @@ -39,6 +39,30 @@ in home-assistant = { enable = true; config = { + binary_sensor = [ + { + platform = "rest"; + name = "Turmlabor"; + unique_id = "status_turmlabor_dresden"; + resource = "https://turmlabor.de/spaces.api"; + method = "GET"; + scan_interval = 60; + verify_ssl = true; + value_template = "{{ value_json['state']['open'] }}"; + device_class = "door"; + } + { + platform = "rest"; + name = "c3d2"; + unique_id = "status_c3d2"; + resource = "https://c3d2.de/spaceapi.json"; + method = "GET"; + scan_interval = 60; + verify_ssl = true; + value_template = "{{ value_json['state']['open'] }}"; + device_class = "door"; + } + ]; default_config = { }; # yes, this is required... automation = "!include automations.yaml"; homeassistant = {