Skip to content
This repository has been archived by the owner on Aug 22, 2021. It is now read-only.

Commit

Permalink
Added fallback whenever configuration parameters for REST API and MQT…
Browse files Browse the repository at this point in the history
…T Discovery are not defined.
  • Loading branch information
stelgenhof committed Aug 25, 2017
1 parent 87d86fb commit aa187cc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@

#include "config.h"

// Fallback
#ifndef MQTT_HOMEASSISTANT_DISCOVERY_ENABLED
#define MQTT_HOMEASSISTANT_DISCOVERY_ENABLED false
#endif

#ifndef MQTT_HOMEASSISTANT_DISCOVERY_PREFIX
#define MQTT_HOMEASSISTANT_DISCOVERY_PREFIX "homeassistant"
#endif

#ifndef REST_API_ENABLED
#define REST_API_ENABLED false
#endif

#include "AiLight.hpp"
#include "ArduinoOTA.h"
#include <ArduinoJson.h>
Expand Down

0 comments on commit aa187cc

Please sign in to comment.