Fan Speed Trait
API Service: FanSpeedApi
Trait for devices that can control the speed of a fan.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| GetFanSpeed | GetFanSpeedRequest | FanSpeed | GetFanSpeed returns the fan speed for the device. |
| UpdateFanSpeed | UpdateFanSpeedRequest | FanSpeed | UpdateFanSpeed updates the fan speed for the device. |
| PullFanSpeed | PullFanSpeedRequest | PullFanSpeedResponse stream | PullFanSpeed returns a stream of changes to the current fan speed for the device. |
| ReverseFanSpeedDirection | ReverseFanSpeedDirectionRequest | FanSpeed | ReverseFanSpeedDirection reverses the fan speed direction. If the fan is spinning FORWARD it will be changed to BACKWARD, etc. |
Info Service: FanSpeedInfo
Describes the capabilities of a specific named device with respect to this trait.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| DescribeFanSpeed | DescribeFanSpeedRequest | FanSpeedSupport | Get information about how a named device implements FanSpeed features |
FanSpeed
FanSpeed describes how fast a fan is spinning.
| Field Name | Type | Description |
|---|---|---|
| percentage | float | Percentage describes the fan speed relative to it's minimum and maximum fan speed. In the range [0,100]. |
| preset | string | Preset describes the fan speed in terms of qualitative values, low, high, etc. Available values are reported via FanSpeedSupport.presets. |
| preset_index | int32 | Preset index is the index in FanSpeedSupport.presets of the currently selected preset. This field is primarily used for relative speed adjustment, a value of 1 when the update is relative, adds 1 to the active preset, increasing the fan speed by one adjustment. Negative values would decrease the fan speed by an equivalent number of steps. |
| direction | FanSpeed.Direction | Direction describes the direction of the fan rotation. This is typically described relative to the function of the fan. For example a table top fan might describe FORWARD as blowing air out the front of the fan. |
FanSpeed.Direction
| Name | Number | Description |
|---|---|---|
| DIRECTION_UNSPECIFIED | 0 | |
| FORWARD | 1 | |
| BACKWARD | 2 |
FanSpeedSupport
| Field Name | Type | Description |
|---|---|---|
| resource_support | smartcore.types.ResourceSupport | How a named device supports read/write/pull apis |
| presets | repeated string | Presets is the list of supported fan speed presets, in ascending fan speed order - i.e. index 0 is the slowest. |
GetFanSpeedRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | Name of the device to fetch the state for |
| read_mask | google.protobuf.FieldMask | Fields to fetch relative to the FanSpeed type |
UpdateFanSpeedRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | Name of the device to fetch the state for |
| fan_speed | FanSpeed | The new fan speed. |
| update_mask | google.protobuf.FieldMask | Fields to fetch relative to the FanSpeed type |
| relative | bool | Values in fan_speed are relative to their current values. FanSpeed.preset cannot be directly set relatively, use preset_index instead to adjust the selected preset index. |
ReverseFanSpeedDirectionRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | Name of the device to reverse the fan speed for. |
PullFanSpeedRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | Name of the device to fetch the state for |
| read_mask | google.protobuf.FieldMask | Fields to fetch relative to the FanSpeed type |
| updates_only | bool | When true the device will only send changes to the resource value. The default behaviour is to send the current value immediately followed by any updates as they happen. |
PullFanSpeedResponse
| Field Name | Type | Description |
|---|---|---|
| changes | repeated PullFanSpeedResponse.Change | Changes since the last message. |
PullFanSpeedResponse.Change
| Field Name | Type | Description |
|---|---|---|
| name | string | Name of the device that issued the change. |
| change_time | google.protobuf.Timestamp | When the change occurred |
| fan_speed | FanSpeed | The new value for the current fan speed. |
DescribeFanSpeedRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | The name of the device |