0.8.1 • Published 5 years ago

@michieldecoster/home-automation v0.8.1

Weekly downloads
9
License
MIT
Repository
github
Last release
5 years ago

Home-automation

NPM-badge

ESLint

Markdown Linter

Tests

Description

This is a repository for the use of home-automation.

Its developed in typescript and uses npm package manager to install.

Installation instructions

Uses npm to install

Command:

npm install michieldecoster/home-automation

Usage instructions and examples

Creating a Thermostat

Create a JSONThermostat with the 3 required parameters:

  • Temperature
  • Range
  • Unit: with the choice of
    • Celsius
    • Fahrenheit
    • Kelvin

Example 1 :

const thermo = new JSONThermostat( { temperature: 75,range: 1, unit: "Fahrenheit" } )

Example 2 :

const thermo = new JSONThermostat( { temperature: 30,range: 5, unit: "Celsius" } )

Updating the Thermostat

The termostat can be updated through the use of the update method.

There are 3 values you can update:

  • Temperature
  • Range
  • Unit: with the choice of
    • Celsius
    • Fahrenheit
    • Kelvin

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" } )

Running the coded tests

npm run tests

Licence

MIT

Github Pages

Github Pages link

Author Information

Author: Michiel Decoster

Student at Vives Hogeschool Brugge

0.8.1

5 years ago

0.8.0

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.3

5 years ago