Cost-Effective and Safe Heating with Green Energy