Smart Home HumiditySetting Trait Schema

action.devices.traits.HumiditySetting - This trait belongs to devices that support humidity settings such as humidifiers and dehumidifiers.

Device ATTRIBUTES

Devices with this trait may report the following attributes as part of the SYNC operation. To learn more about handling SYNC intents, see Intent fulfillment.

Attributes Type Description
humiditySetpointRange Object

Contains the minimum and maximum humidity levels as percentages.

minPercent Integer

(Default: 0)

Represents the minimum humidity level as a percentage.

maxPercent Integer

(Default: 100)

Represents the maximum humidity level as a percentage.

commandOnlyHumiditySetting Boolean

(Default: false)

Indicates if the device supports using one-way (true) or two-way (false) communication. Set this attribute to true if the device cannot respond to a QUERY intent or Report State for this trait.

queryOnlyHumiditySetting Boolean

(Default: false)

Required if the device supports query-only execution. This attribute indicates if the device can only be queried for state information, and cannot be controlled.

Examples

Device that supports the default humidity range.

Device that supports a custom humidity range.

{
  "humiditySetpointRange": {
    "minPercent": 25,
    "maxPercent": 75
  }
}

Device STATES

Devices with this trait may report the following states as part of the QUERY operation. To learn more about handling QUERY intents, see Intent fulfillment.

States Type Description
humiditySetpointPercent Integer

Indicates the current target humidity percentage of the device. Must fall within humiditySetpointRange.

humidityAmbientPercent Integer

Indicates the current ambient humidity reading of the device as a percentage.

Examples

What humidity does my device show?

{
  "humiditySetpointPercent": 20,
  "humidityAmbientPercent": 15
}

Device COMMANDS

Devices with this trait may respond to the following commands as part of the EXECUTE operation. To learn more about handling EXECUTE intents, see Intent fulfillment.

action.devices.commands.SetHumidity

Set the humidity level to an absolute value.

Parameters

Parameters Type Description
humidity Integer

Required.

Setpoint humidity percentage. Must fall within humiditySetpointRange.

Examples

Set the humidity to 20 percent.

{
  "command": "action.devices.commands.SetHumidity",
  "params": {
    "humidity": 20
  }
}

An error occurred setting the target humidity.

Supported values:

maxSettingReached
minSettingReached
valueOutOfRange

action.devices.commands.HumidityRelative

Adjust the humidity level relative to the current value.

This command requires the following attributes:
{
  "commandOnlyHumiditySetting": true
}

Parameters

The payload contains one of the following:

Set humidity percent.

Parameters Type Description
humidityRelativePercent Integer

Required.

The percentage value to adjust the humidity level.

Set humidity weight.

Parameters Type Description
humidityRelativeWeight Integer

Required.

Indicates the amount of ambiguous humidity change from a small amount ("a little") to a large amount ("a lot").

Examples

Increase the humidity 10 percent

{
  "command": "action.devices.commands.HumidityRelative",
  "params": {
    "humidityRelativePercent": 10
  }
}

Decrease the humidity a lot

{
  "command": "action.devices.commands.HumidityRelative",
  "params": {
    "humidityRelativeWeight": -5
  }
}

An error occurred adjusting the humidity.

Supported values:

maxSettingReached
minSettingReached
valueOutOfRange

Device ERRORS

See the full list of errors and exceptions.