Right, but you also can't allow Russia to invade a sovereign democratic country. So the sanctions are justified there, it is just that the EU cannot survive long without Russian gas, so it creates a dilemma. You can support Ukraine and have cold homes and shut down industry, or allow Ukraine to fall to the Russians and admit that Russia has too much control over European energy to make any retaliatory action practical in the long term.
I doubt Russia would allow anything but a total withdrawal of Western support from Ukraine before turning the gas taps back to full. Whilst it is almost certainly hurting Russia to only sell 20% of its gas (the country's GDP is 50% energy export and the majority customer is Europe; like EU there is strong focus to one customer - there are not enough pipelines to supply Asia, or export LNG etc.), I fear that Russia can probably outlast a reduction in gas purchases.
From a purely self-interested perspective: Russia's actions in cutting off gas are justified, because why would they fuel their enemy? But, Russia's actions in Ukraine absolutely are not justifiable.