diff --git a/README.hbs b/README.hbs index a5adab6..6e84073 100644 --- a/README.hbs +++ b/README.hbs @@ -55,6 +55,7 @@ client.on('no_response', () => { | Command | Values | Description | |-|-|-| | **temperature** | any integer |In degrees Celsius by default | +| **currentTemperature** | any integer |In degrees Celsius by default. (Read-only) | | **mode** | _auto_, _cool_, _heat_, _dry_, _fan_only_|Operation mode | | **fanspeed** | _auto_, _low_, _mediumLow_, _medium_, _mediumHigh_, _high_ | Fan speed | | **swinghor** | _default_, _full_, _fixedLeft_, _fixedMidLeft_, _fixedMid_, _fixedMidRight_, _fixedRight_ | Horizontal Swing | diff --git a/README.md b/README.md index 171d0af..06fc80b 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ client.on('no_response', () => { | Command | Values | Description | |-|-|-| | **temperature** | any integer |In degrees Celsius by default | +| **currentTemperature** | any integer |In degrees Celsius by default. (Read-only) | | **mode** | _auto_, _cool_, _heat_, _dry_, _fan_only_|Operation mode | | **fanspeed** | _auto_, _low_, _mediumLow_, _medium_, _mediumHigh_, _high_ | Fan speed | | **swinghor** | _default_, _full_, _fixedLeft_, _fixedMidLeft_, _fixedMid_, _fixedMidRight_, _fixedRight_ | Horizontal Swing | diff --git a/test/property-transformer-test.js b/test/property-transformer-test.js index 71eeddb..8199c9d 100644 --- a/test/property-transformer-test.js +++ b/test/property-transformer-test.js @@ -17,6 +17,17 @@ describe('PropertyTransformer', function () { currentTemperature: 27 }); }); + + it('should not subtract 40 from vendor value in case of zero', function () { + const SUT = new PropertyTransformer(); + const result = SUT.fromVendor({ + TemSen: 0 + }); + + assert.deepEqual(result, { + currentTemperature: 0 + }); + }); }); describe('#toVendor()', function () { it('should transform from human friendly to vendor', function () {