[Breaking] Deactivate Home Assistant presence per default (#915)

And enable to activate it by MQTT
This commit is contained in:
Florian authored and GitHub committed 2021-04-04 19:34:36 -05:00
1 parent adc5f157cd
commit e1aef48296
5 files changed
+41 -18

No files matched your search

+4 -1
View File
@@ -71,6 +71,9 @@ bool bleConnect = AttemptBLECOnnect;
#ifndef PublishOnlySensors
# define PublishOnlySensors false //false if we publish all BLE devices discovered or true only the identified sensors (like temperature sensors)
#endif
#ifndef HassPresence
# define HassPresence false //false if we publish into Home Assistant presence topic
#endif
#ifndef BTQueueSize
# define BTQueueSize 4 // lockless queue size for multi core cases (ESP32 currently)
@@ -92,6 +95,7 @@ unsigned int BLEinterval = TimeBtwRead; //time between 2 scans
unsigned int BLEscanBeforeConnect = ScanBeforeConnect; //Number of BLE scans between connection cycles
unsigned long scanCount = 0;
bool publishOnlySensors = PublishOnlySensors;
bool hassPresence = HassPresence;
#ifndef pubKnownBLEServiceData
# define pubKnownBLEServiceData false // define true if you want to publish service data belonging to recognised sensors
@@ -110,7 +114,6 @@ bool publishOnlySensors = PublishOnlySensors;
#endif
/*-------------------HOME ASSISTANT ROOM PRESENCE ----------------------*/
// if not commented Home presence integration with HOME ASSISTANT is activated
#define subjectHomePresence "home_presence/" // will send Home Assistant room presence message to this topic (first part is same for all rooms, second is room name)
enum ble_sensor_model {