diff --git a/USAGE.md b/USAGE.md index 202e28e6..9d61ff6a 100644 --- a/USAGE.md +++ b/USAGE.md @@ -495,7 +495,7 @@ Default attributes for each type are displayed in _italic_ and are depending on Device Types | Supported Attributes | Description -------------|----------------------|------------ -`AirConditioner` | _[`HeatingCoolingMode`](#heatingcoolingmode)_, [`TargetTemperature`](#targettemperature), [`CurrentTemperature`](#currenttemperature), [`FanSpeed`](#fanspeed), [`FanDirection`](#fandirection), [`FanOscillate`](#fanoscillate) | A device that cools the air in interior spaces. +`AirConditioner` | _[`PowerState`](#powerstate)_, [`TargetTemperature`](#targettemperature), [`CurrentTemperature`](#currenttemperature), [`FanSpeed`](#fanspeed), [`FanDirection`](#fandirection), [`FanOscillate`](#fanoscillate) | A device that cools the air in interior spaces. `AirFreshener` | Same as `Fan` | A device that emits pleasant odors and masks unpleasant odors in interior spaces. `AirPurifier` | Same as `Fan` | A device that improves the quality of air in interior spaces. `Automobile` | [`BatteryLevel`](#batterylevel), [`FanSpeed`](#fanspeed), [`LockState`](#lockstate), [`PowerState`](#powerstate), [`CurrentTemperature`](#currenttemperature) | A motor vehicle (automobile, car). diff --git a/lambda/alexa/smarthome/device/types/airConditioner.js b/lambda/alexa/smarthome/device/types/airConditioner.js index 6f39e915..318a5818 100644 --- a/lambda/alexa/smarthome/device/types/airConditioner.js +++ b/lambda/alexa/smarthome/device/types/airConditioner.js @@ -13,7 +13,7 @@ const AlexaDisplayCategory = require('@alexa/smarthome/category'); const Fan = require('./fan'); -const { HeatingCoolingMode, TargetTemperature, Temperature } = require('../attributes'); +const { TargetTemperature, Temperature, PowerState } = require('../attributes'); /** * Defines air conditioner device type class @@ -33,7 +33,7 @@ class AirConditioner extends Fan { * @return {Array} */ static get supportedAttributes() { - return [HeatingCoolingMode, TargetTemperature, Temperature, ...super.supportedAttributes]; + return [TargetTemperature, Temperature, ...super.supportedAttributes]; } /** @@ -41,7 +41,7 @@ class AirConditioner extends Fan { * @return {Array} */ static get defaultAttributes() { - return [HeatingCoolingMode]; + return [PowerState]; } /** diff --git a/lambda/test/alexa/cases/discovery/airConditioner.test.js b/lambda/test/alexa/cases/discovery/airConditioner.test.js index 9a69b0e1..b6b20473 100644 --- a/lambda/test/alexa/cases/discovery/airConditioner.test.js +++ b/lambda/test/alexa/cases/discovery/airConditioner.test.js @@ -27,12 +27,7 @@ module.exports = { ], expected: { airConditioner: { - capabilities: [ - 'Alexa.ThermostatController.thermostatMode', - 'Alexa.PowerController.powerState', - 'Alexa.EndpointHealth.connectivity', - 'Alexa' - ], + capabilities: ['Alexa.PowerController.powerState', 'Alexa.EndpointHealth.connectivity', 'Alexa'], displayCategories: ['AIR_CONDITIONER'], friendlyName: 'Air Conditioner' }