You can turn off your Xfinity Flex box.
Press the Xfinity button on your remote.
Open up Settings and go to Device Settings
Open Power Preferences.
Click Power Down Now to turn off your Flex box.