Button status change

Hello,
i’m using esp8266 ,led and push button
the led is controlled by Cayenne and pushbutton
i wont to update status of the button in Cayenne dashboard if i used the pushbutton to control the led (ex if the button in Cayenne is off and i press the pushbutton to set the led to on the button status in Cayenne must be on )

have a look at this example Cayenne-MQTT-Arduino/GenericDigitalInput.ino at master · myDevicesIoT/Cayenne-MQTT-Arduino · GitHub