Skip to content

Commit

Permalink
Add support for light sensor (project-chip#14920)
Browse files Browse the repository at this point in the history
  • Loading branch information
nivi-apple authored Feb 9, 2022
1 parent 3ef9ec3 commit ce1f29a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/all-clusters-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,12 @@ void SetupPretendDevices()
AddCluster("Humidity Sensor");
AddAttribute("MeasuredValue", "30");
app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(1, static_cast<int16_t>(30 * 100));

AddDevice("Light Sensor");
AddEndpoint("External");
AddCluster("Illuminance Measurement");
AddAttribute("MeasuredValue", "1000");
app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Set(1, static_cast<int16_t>(1000));
}

WiFiWidget pairingWindowLED;
Expand Down

0 comments on commit ce1f29a

Please sign in to comment.