There are multiple reasons why a cooling and heating unit suddenly fails or gradually stops working constantly.
Anyone that pays attention is likely to note the swings as they set in, and know that there are reasons why the A/C suddenly stopped working! Rather than panic, calmly stop and assess the potential causes, and first, start by checking the thermostat since this is one of the major issues. You will be looking for dead batteries, which you can tell by replacing the existing ones with new ones. Sometimes all stopping the unit from working are dead batteries, and if changing thermostat batteries does not return everything to normal, the next place to check is the indoor switch. Find out if it was accidentally switched off, as this is likely to happen. Adjust it accordingly and check if normalcy returns. If not, proceed to check the outdoor switch and adjust it. The A/C outdoor unit may be switched off for multiple reasons, some of which are not necessarily accidental. Reset this and check if everything returns to normal. If no swings happen, you must check for a tripped circuit breaker, a blown fuse, or a blown transformer, and most of these steps do not require the involvement of an Hhating and A/C business. You also want to inspect and clean dirty coils and replace dirty filters since they can cause the coils to freeze, which is not what you want. If doing all this does not work, then calling an heating and A/C business is sensible. There may be broken components that need the knowledge of a professional cooling and furnace expert.