Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ogiewon committed Jan 18, 2020
2 parents 56d525b + e5b9dc3 commit 4dfec98
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// temperature, humidity, and pressure from a BME280 series sensor using the Adafruit_BME280 library.
//
// Create an instance of this class in your sketch's global variable section
// For Example: st::PS_AdafruitBME280_TempHumidPress sensor2("bme280_1", 60, 0, "temperature1", "humidity1", "pressure1", false, 100, 0x77);
// For Example: st::PS_AdafruitBME280_TempHumidPress sensor2(F("bme280_1"), 60, 0, "temperature1", "humidity1", "pressure1", false, 100, 0x77);
//
// st::PS_AdafruitBME280_TempHumidPress() constructor requires the following arguments
// - String &name - REQUIRED - the name of the object - must be unique, but is not used for data transfer for this device
Expand All @@ -17,7 +17,7 @@
// - String strTemp - REQUIRED - name of temperature sensor to send to ST Cloud (e.g."temperature1")
// - String strHumid - REQUIRED - name of humidity sensor to send to ST Cloud (e.g. "humidity1")
// - String strPressure - REQUIRED - name of pressure sensor to send to ST Cloud (e.g. "pressure1")
// - bool In_C - OPTIONAL - true = Report Celsius, false = Report Farenheit (Farentheit is the default)
// - bool In_C - OPTIONAL - true = Report Celsius, false = Report Fahrenheit (Fahrenheit is the default)
// - byte filterConstant - OPTIONAL - Value from 5% to 100% to determine how much filtering/averaging is performed 100 = none (default), 5 = maximum
// - int address - OPTIONAL - I2C address of the sensor (defaults to 0x77 for the BME280)
//
Expand Down Expand Up @@ -190,4 +190,4 @@ namespace st

}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// temperature, humidity, and pressure from a BME280 series sensor using the Adafruit_BME280 library.
//
// Create an instance of this class in your sketch's global variable section
// For Example: st::PS_AdafruitBME280_TempHumidPress sensor2("bme280_1", 60, 0, "temperature1", "humidity1", "pressure1", false, 100, 0x77);
// For Example: st::PS_AdafruitBME280_TempHumidPress sensor2(F("bme280_1"), 60, 0, "temperature1", "humidity1", "pressure1", false, 100, 0x77);
//
// st::PS_AdafruitBME280_TempHumidPress() constructor requires the following arguments
// - String &name - REQUIRED - the name of the object - must be unique, but is not used for data transfer for this device
Expand All @@ -17,7 +17,7 @@
// - String strTemp - REQUIRED - name of temperature sensor to send to ST Cloud (e.g."temperature1")
// - String strHumid - REQUIRED - name of humidity sensor to send to ST Cloud (e.g. "humidity1")
// - String strPressure - REQUIRED - name of pressure sensor to send to ST Cloud (e.g. "pressure1")
// - bool In_C - OPTIONAL - true = Report Celsius, false = Report Farenheit (Farentheit is the default)
// - bool In_C - OPTIONAL - true = Report Celsius, false = Report Fahrenheit (Fahrenheit is the default)
// - byte filterConstant - OPTIONAL - Value from 5% to 100% to determine how much filtering/averaging is performed 100 = none (default), 5 = maximum
// - int address - OPTIONAL - I2C address of the sensor (defaults to 0x77 for the BME280)
//
Expand Down
5 changes: 3 additions & 2 deletions HubDuino/Drivers/child-presence-sensor.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* 2018-06-02 Dan Ogorchock Revised/Simplified for Hubitat Composite Driver Model
* 2018-09-22 Dan Ogorchock Added preference for debug logging
* 2019-07-01 Dan Ogorchock Added importUrl
* 2019-12-17 Dan Ogorchock Suppress debug logging based on user setting
*
*/
metadata {
Expand Down Expand Up @@ -75,7 +76,7 @@ def parse(String description) {
if (value.isNumber()) {
sendEvent(name: "level", value: value)
if (presenceTriggerValue) {
log.debug "Presence received a numeric value. Perform comparison of value: ${Float.valueOf(value.trim())} versus presenceTriggerValue: ${presenceTriggerValue}"
if (logEnable) log.debug "Presence received a numeric value. Perform comparison of value: ${Float.valueOf(value.trim())} versus presenceTriggerValue: ${presenceTriggerValue}"
if (Float.valueOf(value.trim()) >= presenceTriggerValue) {
value = invertTriggerLogic?"not present":"present"
}
Expand All @@ -88,7 +89,7 @@ def parse(String description) {
}
}
else {
log.debug "Presence received a string. value = ${value}"
if (logEnable) log.debug "Presence received a string. value = ${value}"
if (value != "present") { value = "not present" }
}
// Update device
Expand Down

0 comments on commit 4dfec98

Please sign in to comment.