diff --git a/libraries/MySensors/MySensor.cpp b/libraries/MySensors/MySensor.cpp index 184317a..b953fd7 100644 --- a/libraries/MySensors/MySensor.cpp +++ b/libraries/MySensors/MySensor.cpp @@ -484,7 +484,7 @@ void MySensor::sendBatteryLevel(uint8_t value, bool enableAck) { } void MySensor::present(uint8_t childSensorId, uint8_t sensorType, bool enableAck, const char*description) { - sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, childSensorId, C_PRESENTATION, sensorType, enableAck).set(description)); + sendRoute(build(msg, nc.nodeId, GATEWAY_ADDRESS, childSensorId, C_PRESENTATION, sensorType, enableAck).set(childSensorId==NODE_SENSOR_ID?LIBRARY_VERSION:description)); } void MySensor::sendSketchInfo(const char *name, const char *version, bool enableAck) { diff --git a/libraries/MySensors/MySensor.h b/libraries/MySensors/MySensor.h index 5798ac7..0c89604 100644 --- a/libraries/MySensors/MySensor.h +++ b/libraries/MySensors/MySensor.h @@ -180,7 +180,7 @@ class MySensor * @param ack Set this to true if you want destination node to send ack back to this node. Default is not to request any ack. * @param description A textual description of the sensor. Defaults to library version. */ - void present(uint8_t sensorId, uint8_t sensorType, bool ack=false, const char *description=LIBRARY_VERSION); + void present(uint8_t sensorId, uint8_t sensorType, bool ack=false, const char *description=""); /** * Sends sketch meta information to the gateway. Not mandatory but a nice thing to do.