Category editor · home/appliances/televisions/generic

Televisions generic

This category is deprecated. Use the /home/appliances/televisions/generic/ranges category instead.

7 fields46 data items0 returnsCalculatorenterprise

Algorithm

Read-only in v1

Algorithm editing is deferred. This is the source currently used by the calculator; it is not editable in this prototype.

default.js618 characters
// get country from metadata
country = profileFinder.getProfileItemValue('metadata', 'country');
if ((country == null) || (country == '')) {
	country = 'United Kingdom';
}

// get electricity value based on country
countryElecValue = dataFinder.getDataItemValue('home/energy/electricity', 'country=' + country, 'kgCO2PerKWh');
if(countryElecValue==null){//try ISO code
  countryElecValue = dataFinder.getDataItemValue('home/energy/electricityiso', 'country=' + country, 'kgCO2PerKWh');
}

// now calculate the monthly kgCO2 emissions
if (countryElecValue != null) {
    kW * hoursOn * countryElecValue; 
} else {
	0;
}