From 32578045ff33f4bee93c1fabf28fadf7127dca6d Mon Sep 17 00:00:00 2001 From: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Date: Mon, 24 Jan 2022 09:56:23 -0800 Subject: [PATCH] Add occupancy sensor to the all-clusters-app (#13585) --- 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 a98e4e9f60cf54..840d3d164de336 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -508,6 +508,12 @@ void SetupPretendDevices() AddEndpoint("Door 2"); AddCluster("Door"); AddAttribute("State", "Closed"); + + AddDevice("Occupancy Sensor"); + AddEndpoint("External"); + AddCluster("Occupancy Sensor"); + AddAttribute("Occupancy", "1"); + app::Clusters::OccupancySensing::Attributes::Occupancy::Set(1, 1); } WiFiWidget pairingWindowLED;