/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceSensorEntity'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DeviceEntity> ApiDeviceSensorPostAsync(this IHomeAutomationAPI operations, DeviceSensorEntity deviceSensorEntity = default(DeviceSensorEntity), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ApiDeviceSensorPostWithHttpMessagesAsync(deviceSensorEntity, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }