This is a repository for the use of home-automation.
Its developed in typescript and uses npm package manager to install.
Uses npm to install
Command:
npm install michieldecoster/home-automation
Create a JSONThermostat with the 3 required parameters:
Example 1 :
const thermo = new JSONThermostat( { temperature: 75,range: 1, unit: "Fahrenheit" } )
Example 2 :
const thermo = new JSONThermostat( { temperature: 30,range: 5, unit: "Celsius" } )
The termostat can be updated through the use of the update
method.
There are 3 values you can update:
Example 1: Updating the temperature
thermo.update( { temperature:15 } )
Example 2: Updating the temperature and range
thermo.update( { temperature:20, range: 5 } )
Example 3: Updating the temperature, range and unit
thermo.update( { temperature:15, range:5, unit: "Celsius" } )
npm run tests
MIT
Author: Michiel Decoster
Student at Vives Hogeschool Brugge
Generated using TypeDoc