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 https://github.com/myDevicesIoT/Cayenne-MQTT-Arduino/blob/master/examples/Sensors/GenericDigitalInput/GenericDigitalInput.ino