Brightness Sensor Trait
API Service: BrightnessSensorApi
BrightnessSensorApi reports on the measured ambient brightness for a space.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| GetAmbientBrightness | GetAmbientBrightnessRequest | AmbientBrightness | GetAmbientBrightness returns the current brightness level as measured by the device. |
| PullAmbientBrightness | PullAmbientBrightnessRequest | PullAmbientBrightnessResponse stream | PullAmbientBrightness returns a stream of brightness changes as the device measures them. |
Info Service: BrightnessSensorInfo
Describes the capabilities of a specific named device with respect to this trait.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| DescribeAmbientBrightness | DescribeAmbientBrightnessRequest | AmbientBrightnessSupport | Get information about how a named device implements AmbientBrightness measurements |
AmbientBrightness
AmbientBrightness records the light level measured by a device.
| Field Name | Type | Description |
|---|---|---|
| brightness_lux | float | Brightness measured in LUX |
AmbientBrightnessSupport
AmbientBrightnessSupport describes the capabilities of devices implementing this trait
| Field Name | Type | Description |
|---|---|---|
| resource_support | smartcore.types.ResourceSupport | How a named device supports read/pull apis |
| brightness_lux | smartcore.types.FloatBounds | The range of values the device is capable of reporting. |
GetAmbientBrightnessRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | The name for the device. |
| read_mask | google.protobuf.FieldMask | The state fields to fetch |
PullAmbientBrightnessRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | The name for the device. |
| read_mask | google.protobuf.FieldMask | The state fields to fetch |
| 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. |
PullAmbientBrightnessResponse
| Field Name | Type | Description |
|---|---|---|
| changes | repeated PullAmbientBrightnessResponse.Change |
PullAmbientBrightnessResponse.Change
| Field Name | Type | Description |
|---|---|---|
| name | string | The name for the device that changed |
| ambient_brightness | AmbientBrightness | |
| change_time | google.protobuf.Timestamp | when the change occurred |
DescribeAmbientBrightnessRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | The name of the device |