Single Outlet/Circuit Power Outage

This is my solution for the problem …

but you must use the code of Gainondorf, works correctly …