A method for operating a premix gas burner, the method comprising: - providing the premix gas burner having a burner housing with a burner deck; - acquiring a heat demand related value; - supplying a flow of fuel gas and supplying a flow of air to form a mixture; - supplying the mixture to the premix gas burner to burn the mixture; - controlling in dependence of the acquired heat demand related value at least one of: • an air flow rate, and • a fuel gas flow rate, so as to generate heat with the premix burner in accordance with the acquired heat demand related value; wherein - the fuel gas comprises hydrogen (H 2); and wherein the method further comprises: - providing a desired air excess factor relation (λ d) of the mixture which defines the relation between a desired air excess factor and a chosen input variable, wherein the input variable is one of the following parameters: • the heat demand related value; • the air flow rate related value indicative for a flow rate of the flow of air; or • the fuel gas flow rate related value indicative of the actual fuel gas flow rate, wherein the desired air excess factor (λ d) is not a constant factor but varies for different input variable values, wherein the desired air excess factor (λ d) is defined as the ratio of the desired air to fuel gas ratio of the mixture relative to the stoichiometric air to fuel gas ratio; - determining an actual value (I a) of the input variable; - determining an actual air excess factor (λ a), wherein the actual air excess factor (λ a) is defined as the ratio of the actual air to fuel gas ratio of the mixture relative to the stoichiometric air to fuel gas ratio; - controlling the fuel gas flow rate and the air flow rate such that: • the actual air excess factor (λ a) converges towards the desired air excess factor (λ d) belonging to the actual value (I a) of the input variable; and that • the heat generated with the premix burner remains in accordance with the acquired heat demand related value. - providing the premix gas burner having a burner housing with a burner deck; - acquiring a heat demand related value; - supplying a flow of fuel gas and supplying a flow of air to form a mixture; - supplying the mixture to the premix gas burner to burn the mixture; - controlling in dependence of the acquired heat demand related value at least one of: • an air flow rate, and • a fuel gas flow rate, • an air flow rate, and • a fuel gas flow rate, - the fuel gas comprises hydrogen (H 2); and - providing a desired air excess factor relation (λ d) of the mixture which defines the relation between a desired air excess factor and a chosen input variable, wherein the input variable is one of the following parameters: • the heat demand related value; • the air flow rate related value indicative for a flow rate of the flow of air; or • the fuel gas flow rate related value indicative of the actual fuel gas flow rate, wherein the desired air excess factor (λ d) is not a constant factor but varies for different input variable values, wherein the desired air excess factor (λ d) is defined as the ratio of the desired air to fuel gas ratio of the mixture relative to the stoichiometric air to fuel gas ratio; • the heat demand related value; • the air flow rate related value indicative for a flow rate of the flow of air; or • the fuel gas flow rate related value indicative of the actual fuel gas flow rate, wherein the desired air excess factor (λ d) is not a constant factor but varies for different input variable values, wherein the desired air excess factor (λ d) is defined as the ratio of the desired air to fuel gas ratio of the mixture relative to the stoichiometric air to fuel gas ratio; wherein the desired air excess factor (λ d) is not a constant factor but varies for different input variable values, wherein the desired air excess factor (λ d) is defined as the ratio of the desired air to fuel gas ratio of the mixture relative to the stoichiometric air to fuel gas ratio; - determining an actual value (I a) of the input variable; - determining an actual air excess factor (λ a), wherein the actual air excess factor (λ a) is defined as the ratio of the actual air to fuel gas ratio of the mixture relative to the stoichiometric air to fuel gas ratio; - controlling the fuel gas flow rate and the air flow rate such that: • the actual air excess factor (λ a) converges towards the desired air excess factor (λ d) belonging to the actual value (I a) of the input variable; and that • the heat generated with the premix burner remains in accordance with the acquired heat demand related value. • the actual air excess factor (λ a) converges towards the desired air excess factor (λ d) belonging to the actual value (I a) of the input variable; and that • the heat generated with the premix burner remains in accordance with the acquired heat demand related value.