From 2243746c0c2e67fe89228df304750632d47804d9 Mon Sep 17 00:00:00 2001 From: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Date: Tue, 8 Feb 2022 18:22:10 -0800 Subject: [PATCH] Add support for light sensor (#14920) --- examples/all-clusters-app/esp32/main/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index a50444821800a6..86c6fd10d8d3b2 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -540,6 +540,12 @@ void SetupPretendDevices() AddCluster("Humidity Sensor"); AddAttribute("MeasuredValue", "30"); app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(1, static_cast(30 * 100)); + + AddDevice("Light Sensor"); + AddEndpoint("External"); + AddCluster("Illuminance Measurement"); + AddAttribute("MeasuredValue", "1000"); + app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Set(1, static_cast(1000)); } WiFiWidget pairingWindowLED;