File tree 1 file changed +3
-2
lines changed
examples/PlatformIO/BME280/src
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 45
45
46
46
WebThingAdapter* adapter;
47
47
48
- const char * bme280Types[] = {nullptr };
48
+ const char * bme280Types[] = {" TemperatureSensor " , nullptr };
49
49
ThingDevice weather (" bme280" , " BME280 Weather Sensor" , bme280Types);
50
- ThingProperty weatherTemp (" temperature" , " " , NUMBER, nullptr );
50
+ ThingProperty weatherTemp (" temperature" , " " , NUMBER, " TemperatureProperty " );
51
51
ThingProperty weatherHum (" humidity" , " " , NUMBER, nullptr );
52
52
ThingProperty weatherPres (" pressure" , " " , NUMBER, nullptr );
53
53
@@ -122,6 +122,7 @@ void setup() {
122
122
digitalWrite (LED_BUILTIN, PIN_STATE_HIGH);
123
123
adapter = new WebThingAdapter (" weathersensor" , WiFi.localIP ());
124
124
125
+ weatherTemp.unit = " c" ;
125
126
weather.addProperty (&weatherTemp);
126
127
weather.addProperty (&weatherPres);
127
128
weather.addProperty (&weatherHum);
You can’t perform that action at this time.
0 commit comments