JSONThermostat class that can construct a Thermostat that takes in a JSON object with 3 required paramters:
import JSONThermostat from './JSONThermostat' const thermo = new JSONThermostat( { temperature: 75,range: 1, unit: "Fahrenheit" } )
These are also the ones you can update through the update() method
thermo.update( { temperature:12 } ) thermo.update( { temperature:20, range: 5 } ) thermo.update( { temperature:15, range:5, unit: "Celsius" } )
Generated using TypeDoc
JSONThermostat class that can construct a Thermostat that takes in a JSON object with 3 required paramters:
import JSONThermostat from './JSONThermostat' const thermo = new JSONThermostat( { temperature: 75,range: 1, unit: "Fahrenheit" } )
These are also the ones you can update through the update() method
thermo.update( { temperature:12 } ) thermo.update( { temperature:20, range: 5 } ) thermo.update( { temperature:15, range:5, unit: "Celsius" } )