Chip temperature is published, too
This commit is contained in:
parent
5deea587a8
commit
55d66b763c
@ -28,6 +28,7 @@
|
|||||||
#define TEMPERATUR_SENSOR_LIPO "lipo"
|
#define TEMPERATUR_SENSOR_LIPO "lipo"
|
||||||
#define TEMPERATUR_SENSOR_WATER "water"
|
#define TEMPERATUR_SENSOR_WATER "water"
|
||||||
#define TEMPERATUR_SENSOR_OUTSIDE "temp"
|
#define TEMPERATUR_SENSOR_OUTSIDE "temp"
|
||||||
|
#define TEMPERATUR_SENSOR_CHIP "chip"
|
||||||
#define TEMPERATURE_NAME "Temperature"
|
#define TEMPERATURE_NAME "Temperature"
|
||||||
#define TEMPERATURE_UNIT "°C"
|
#define TEMPERATURE_UNIT "°C"
|
||||||
|
|
||||||
|
@ -387,6 +387,11 @@ void mode2MQTT()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! isnan(mChipTemp)) {
|
||||||
|
sensorTemp.setProperty(TEMPERATUR_SENSOR_CHIP).send(String(mChipTemp));
|
||||||
|
Serial << "Chip Temperatur " << mChipTemp << " °C " << endl;
|
||||||
|
}
|
||||||
|
|
||||||
/* deactivate the sensors */
|
/* deactivate the sensors */
|
||||||
digitalWrite(OUTPUT_SENSOR, LOW);
|
digitalWrite(OUTPUT_SENSOR, LOW);
|
||||||
}
|
}
|
||||||
@ -798,6 +803,10 @@ void systemInit()
|
|||||||
.setName(TEMPERATURE_NAME)
|
.setName(TEMPERATURE_NAME)
|
||||||
.setDatatype(NUMBER_TYPE)
|
.setDatatype(NUMBER_TYPE)
|
||||||
.setUnit(TEMPERATURE_UNIT);
|
.setUnit(TEMPERATURE_UNIT);
|
||||||
|
sensorTemp.advertise(TEMPERATUR_SENSOR_CHIP)
|
||||||
|
.setName(TEMPERATURE_NAME)
|
||||||
|
.setDatatype(NUMBER_TYPE)
|
||||||
|
.setUnit(TEMPERATURE_UNIT);
|
||||||
|
|
||||||
sensorLipo.advertise("percent")
|
sensorLipo.advertise("percent")
|
||||||
.setName("Percent")
|
.setName("Percent")
|
||||||
|
Loading…
Reference in New Issue
Block a user